Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Know if shift key is down
Message
 
To
20/04/2009 09:22:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01395572
Message ID:
01395574
Views:
49
>Is there some way to know if the shift key is down .... when the focus is on a different form?
>
>Background: from within my PEMEditor tool, which works when using either the Form or Class Designer, I want to know when the user has held the shfit key while using the designer (presumably for selecting multiple objects).
>
>Thus, normal techniques of capturing key movements or mouse movements are irrelevant, since these events are not occurring on my form.
>
>Thanks in advance.

Something like:
DECLARE INTEGER GetKeyState IN WIN32API INTEGER 
VK_SHIFT    =      0x10
? "Any SHIFT key: ",;
	IIF(GetKeyState(VK_SHIFT) < 0 OR GetKeyState(VK_SHIFT) > 1, "YES","NO")
Good Luck
Previous
Reply
Map
View

Click here to load this message in the networking platform