Information générale
Catégorie:
Codage, syntaxe et commandes
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement