Can you turn on NumLock from VB ?
Another week, another barrage of questions................
If a user starts to type using the NumLock key, is it possible to detect this and turn NumLock on ?
Alternatively, is it easy enough to have a program turn NumLock on when it starts up ?
Thanks.
Re: Can you turn on NumLock from VB ?
This does not work correctly as it sends a Key Down code but not a keyup code. So if the user presses the Num Lock key it does not work the first time. This code works better (as expected)
keybd_event VK_NUMLOCK, 0, 0, 0 'send NumLock keydown
keybd_event VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0 'send numlock keyup