>Hi there,
>many of user input data into forms without oft looking onto screen ("blind input") and in most cases they don't see possible error onto screen (invalid value into fields ... etc), they looking just on keyboard.
>I think that making some kind of lightshow with LED of NumLock and other flashing in short times could attract users attention that something is wrong and watch onto screen.
>I know how to light up and of first two LED but I can't light up the LED of ScrollLock...
>Is there anybody who knows !?
>Thanks in advance ?
Try the following to toggle the key press
DECLARE keybd_event IN Win32API;
SHORT bVk, SHORT bScan, INTEGER dwFlags, INTEGER deExtraInfo
#DEFINE VK_SCROLL 0x91
#DEFINE KEYEVENTF_EXTENDEDKEY 0x1
#DEFINE KEYEVENTF_KEYUP 0x2
= keybd_event(VK_SCROLL, 0x45, KEYEVENTF_EXTENDEDKEY, 0)
= keybd_event(VK_SCROLL, 0x45, KEYEVENTF_EXTENDEDKEY + KEYEVENTF_KEYUP, 0)
Microsoft KB article Q177674 states that you should use SetKeyboardState() under Win9x, and the above technique under Win NT/2K. I just tested the above, however, under Win98SE and it worked fine.
George
Ubi caritas et amor, deus ibi est