>>>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,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing