Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trap MouseDown or KeyPress using windows API?
Message
From
24/01/2002 21:30:26
 
 
To
17/01/2002 09:23:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00606044
Message ID:
00610253
Views:
19
Tim, I asked for help on resolving ambiguous keystrokes in the keypress event and received this reply from Gerry Schmitz:



Check out the GetAsyncKeyState() Windows API function.

Use it in your .KeyPress() event to test the state of individual keys; eg.
DECLARE SHORT GetAsyncKeyState IN USER32.DLL ;
   INTEGER vKey

#define VK_SHIFT          0x10
#define VK_F2             0x71

IF  BITTEST( GetAsyncKeyState( VK_SHIFT ), 31 ) = .T. ;
AND BITTEST( GetAsyncKeyState( VK_F2    ), 31 ) = .T.
   ...
ENDIF
Perhaps this will apply to your situation.

Peter
Peter Robinson ** Rodes Design ** Virginia
Previous
Reply
Map
View

Click here to load this message in the networking platform