Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping key press events
Message
 
 
À
29/05/2007 18:02:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01229175
Message ID:
01229177
Vues:
23
>I'm trying to trap keypresses that users can use to setup a simple hot key database for data entry.
>
>So, inside my keypress event in my form textbox I use...
>
>
>lparameters nKeyCode, nShiftAltCtrl
>* Check for Alt key
>IF nShiftAltCtrl = 4
>   * Stop VFP's processing of the keystroke
>   NODEFAULT
>   * Provide our own processing of the keystroke
>   this.value = "ALT-" + CHR(nKeyCode)
>   ThisForm.txtTextbox2.SetFocus()
>ENDIF
>
>
>Unfortunately I've found that the keypress is completely ignores my alt key and instead just goes ahead uses the default behavior. For example, hitting alt-f pops up the file menu. Sadly the user has already memorized a ton of alt-???? key presses and I'd like a way for her to edit and manage them in a way that is easy. Any ideas how to get around this?
>
>Greg

You may try using Re: KeyPress - Ctrl-Z and Ctrl-Arrow Thread #1062171 Message #1062173 though I don't think you can use certain Alt combinations which are reserved for menu hotkeys.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform