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:
Hotkey textbox
Miscellaneous
Thread ID:
00400181
Message ID:
00400181
Views:
49
I'd like to include a textbox on one of my forms which allows the user to press a key and the key text appears in the box. For instance, if I press Ctrl-A, the text "Ctrl+A" appears in the box. The user will not be able to type in the box; rather, whatever key they press will replace the existing text in the box. In other words, I want to mimic the behavior of the VFP and Word controls which allow you to select a hotkey to go with a particular action.

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?

Thanks in advance!
zahid
Next
Reply
Map
View

Click here to load this message in the networking platform