W Woody Splawn Dec 9, 2003 #1 Could someone tell me what code I run to determine if the user's numlock is on? Is there code I can run to set the numlock to on?
Could someone tell me what code I run to determine if the user's numlock is on? Is there code I can run to set the numlock to on?
K Ken Tucker [MVP] Dec 10, 2003 #2 Hi, Const VK_NUMLOCK = &H90 Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal nVirtKey As Integer) As Short If GetKeyState(VK_NUMLOCK) Then Me.Text = "Num" Else Me.Text = "" End If Ken
Hi, Const VK_NUMLOCK = &H90 Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal nVirtKey As Integer) As Short If GetKeyState(VK_NUMLOCK) Then Me.Text = "Num" Else Me.Text = "" End If Ken
P Peter Huang Dec 10, 2003 #3 Hi Woody, You may try to GetKeyState API to restrieve the state of Numlock and use the keybd_event to set the state of NUM LOCK. Here is a VB6 version. HOWTO: Toggle the NUM LOCK, CAPS LOCK, and SCROLL LOCK Keys http://support.microsoft.com/default.aspx?scid=kb;EN-US;177674 If you have any concern on this issue, please post here. Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Hi Woody, You may try to GetKeyState API to restrieve the state of Numlock and use the keybd_event to set the state of NUM LOCK. Here is a VB6 version. HOWTO: Toggle the NUM LOCK, CAPS LOCK, and SCROLL LOCK Keys http://support.microsoft.com/default.aspx?scid=kb;EN-US;177674 If you have any concern on this issue, please post here. Regards, Peter Huang Microsoft Online Partner Support Get Secure! www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.