Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to manage with LEDs of NumLock, CapsLock and Scroll
Message
 
To
23/04/2001 09:13:06
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00498543
Message ID:
00498556
Views:
29
>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
* Key down
= keybd_event(VK_SCROLL, 0x45, KEYEVENTF_EXTENDEDKEY, 0)
* Key up
= 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform