Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress event madness...
Message
From
07/10/2003 16:25:26
 
 
To
07/10/2003 16:12:34
Eric Sedlacek
TTSS Interactive Products
Rockville, Maryland, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00835939
Message ID:
00835944
Views:
12
You need to pass the parameters on through the DODEFAULT
(see below)
>This seems simple enough. I want to use the KeyPress event in a text box to remap keys as they are typed. Below is a bit of sample code. Of course, it doesn't work...if it did, I wouldn't be issuing this plaintive plea for help. The example below is trying to map a lower case 'a' into a lower case 'b' and a lower case 'd' into a lower case 'e'. What it actually does is do nothing when 'a' or 'd' are pressed and behaves normally otherwise. How do I do this correctly?
>
LPARAMETERS nKeyCode, nShiftAltCtrl
lnBefore=nKeyCode
DO CASE
     CASE lnBefore=97
          lnAfter=98
     CASE lnBefore=100
          lnAfter=101
     OTHERWISE
          lnAfter=lnBefore
ENDCASE
IF lnBefore<>lnAfter
     NODEFAULT
     nKeyCode=lnAfter
     DODEFAULT(nKeyCode, nShiftAltCtrl)
ENDIF
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform