I am writing a simple program that will tell me if the capslock,numlock, and scroll lock is on or off. I used the GetKeyState function to determine the status of each. However, I noticed that it always says NumLock and ScrollLock are on. I am wondering if this has anything to do with the fact that on my machine i have to hold down an Fn key and then the F11 or F12 to activate/deactivate scroll or numlock.
Does anyone know how i can determine whether or not the scroll/num lock are on or off?
Here is the code i am using:
Const VK_NUMLOCK = &H90
Const VK_OEM_SCROLL = &H91
Private Sub Form_Load()
IIf (GetKeyState(VK_NUMLOCK)=1, "ON", "OFF")