Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping keys
Message
De
14/09/2000 10:31:02
 
 
À
14/09/2000 01:39:08
Ian Johnston
Computer Software Solutions
Woodland, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00416249
Message ID:
00416368
Vues:
26
>Can anyone tell me how to trap the plus and minus keys on the key pad ?
>
>TIA
>Ian

Use the KeyPress event of the object in which you wish to trap it.
If you want to trap it in the form, set the form's KeyPreview=.T.

Trap for INLIST(nKeyCode, ASC("+"), ASC("-"))

Depending on what these keystrokes are doing, e.g., we use these in a date control to move forward and backward a day like in Quicken, you may want to also want to trap for INLIST(nKeyCode, ASC("="), ASC("_")) since these can be sent by the "+" and "-" keys respectively.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform