Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SHIFT+F1 VS SHIFT+t
Message
 
 
To
14/06/2005 08:11:03
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01023044
Message ID:
01023054
Views:
10
You can use Windows API function GetKeyState.
DECLARE INTEGER GetKeyState IN WIN32API INTEGER
IF GetKeyState(VK_F1) < 0
 * F1 is down
ENDIF
For key codes see Re: Is there a way to detect a Key being help down? Message #633669. For details see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/getkeystate.asp

>Hi All,
>
>I have the following codes in the keypress event of a form:
>
>do case
>   case nkeycode= 84 and nShiftAltCtrl=1         &&shift+F1
>        nodefault
>        thisform.button1.click
>endcase
>
>
>button1 is being clicked when the user press shift+F1, however, it got the same result when the user press shift+t(where caps lock is off and the user wants to type 'T' in the text box).
>
>the nkeycode of both shift+F1 and shift+t are 84, how to distinguish between shift+F1 and shift+t ?
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform