Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help ESC
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00759032
Message ID:
00759097
Views:
19
>>>>since I've installed vfp on a new system, the help file is no longer available. I even have developer network installed. I wanted to know how to disable the ESC key on a form.
>>>>Thanks!!!
>>>
>>>Set Form.KeyPreview to .T. and put code to handle nKeyCode=27 in Form.KeyPress.
>>
>>I have a textbox that activates a dropdown box to display a picklist. If the user hits ESC during that time, the F1 key goes back to being 28. F1 is previously assigned to something else.
>
>I don't understand what F1 or 28 has to do with disabling ESC, or what you mean by "F1 goes back to being 28."
>
>INKEY() codes don't change. F1 is always 28. ESC is always 27.
>
>Are you saying your textbox has ON KEY LABEL F1 KEYBOARD "{ESC}" in its When event, or something like that?
>
>If the question is how to disable the ESC key on a form, the answer is to set the form's KeyPreview property to .T., and put code in the form's KeyPress event something like
IF m.nKeyCode=27
>	NODEFAULT
>ENDIF
If that's not the question, I guess I didn't understand your original message.
>
>HTH,

Yes, in the keypress section I have "ON KEY LABEL F1 do form save"
But the F1 reverts back to being 28 if the user hits ESC while in that certain textbox. Then hitting F1 puts a literal '28' in all the textboxes!
then there's no way to properly exit the form
:-(
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform