Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hotkey textbox
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00400181
Message ID:
00401620
Views:
24
Are you sure? I tried something similar - put a WAIT WINDOW in the KeyPress event and then pressed various key combinations. The Ctrl and Shift ones worked as expected. The Alt combinations did not - though I can't recall if they didn't fire the event, or if they did but without indicating that Alt was pressed.

Anyone else able to duplicate the behavior Brien is talking about?
zahid

>>So I can use KeyPress to capture the key, right? Well, according to the Help file, "The KeyPress event does not occur for any combination of keys with the ALT key" (which is bizarre, since the second parameter includes a bit indicating whether Alt was pressed). Since I want the thing to work for Alt keys as well as Ctrl and Shift, am I forced to then go to LASTKEY() or some such to handle this?
>
>Zahid,
>
>I tested this and it does work. To test it yourself, just type SET STEP ON in the KeyPress event of a new form, run the form and look at the values of nKeyCode and nShiftAltCtrl in the debugger. That's a strange comment in the help file. One thing you should note is that the menu takes precedence over the form. That is, if you have the standard menu up and the user types Alt+F, the form's KeyPress event won't fire... the File menu will be activated.
Previous
Reply
Map
View

Click here to load this message in the networking platform