Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping keys
Message
From
14/09/2000 10:31:02
 
 
To
14/09/2000 01:39:08
Ian Johnston
Computer Software Solutions
Woodland, California, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00416249
Message ID:
00416368
Views:
27
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform