Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keyboard command not working?
Message
From
17/10/1996 15:57:30
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00010223
Message ID:
00010352
Views:
37
>>>Has anyone successfully used the command:
>>>
>>>keyboard upper(chr(nkeycode)) &&nkeycode init to 0
>>>
>>>in VFP/Win 95 for textbox input? I used this back in FPW 2.6, without trouble, as I recall. I've tried putting it various places but to no avail, lower case input still shows up lower. I'm using table buffering. What am I doing wrong?
>>>
>>
>>in the keypress event
>>
>>param tnKeyCode,tnALTSHIFTCTRL
>>local lnUpperKeCode
>>lnUpperKeycode=asc(upper(chr(tnKeyCode))
>>textbox::keypress(lnKeyCode,tnALTSHIFTCTRL)
>>nodefault
>>
>>or something similar
>
>Thanks, I've got it working at the textbox level now. I was trying to get it to work at the form level, which makes more sense with many textboxes on many forms, but haven't had much luck there. You have to set Keypreview .T. at the form level, but then all letters show up double (mM, BB, etc.).
>It may be possible to do this, but I'll leave this for another day...

of course it is possible (almost everything is (s))
u still have to put the nodefault though
it is better though (IMHO) to do something general e.g. create
a textbox subclass with a logical property determining the state
it is better OOP

Arnon
Previous
Reply
Map
View

Click here to load this message in the networking platform