C CK Aug 31, 2003 #1 How do I determine the Num Lock status, on or off, and display it on a status bar? TIA
K Ken Tucker Aug 31, 2003 #2 Hi, Use the getkeystate api to determine the numlock state. Setup a timer to update the numlock panel on the statusbar. Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal nVirtKey As Integer) As Boolean Const VK_NUMLOCK = &H90 Ken
Hi, Use the getkeystate api to determine the numlock state. Setup a timer to update the numlock panel on the statusbar. Declare Function GetKeyState Lib "user32" Alias "GetKeyState" (ByVal nVirtKey As Integer) As Boolean Const VK_NUMLOCK = &H90 Ken
H Herfried K. Wagner [MVP] Sep 1, 2003 #3 Hello, CK said: How do I determine the Num Lock status, on or off, and display it on a status bar? Click to expand... Untested: \\\ Private Declare Auto Function GetKeyState Lib "user32.dll" ( _ ByVal nVirtKey As VirtualKey _ ) As Boolean Public Enum VirtualKey As Integer NumLock = 144 CapLock = 20 End Enum .. .. .. If GetKeyState(VirtualKey.NumLock) Then ... End If /// HTH, Herfried K. Wagner
Hello, CK said: How do I determine the Num Lock status, on or off, and display it on a status bar? Click to expand... Untested: \\\ Private Declare Auto Function GetKeyState Lib "user32.dll" ( _ ByVal nVirtKey As VirtualKey _ ) As Boolean Public Enum VirtualKey As Integer NumLock = 144 CapLock = 20 End Enum .. .. .. If GetKeyState(VirtualKey.NumLock) Then ... End If /// HTH, Herfried K. Wagner