Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help ESC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00759032
Message ID:
00759058
Vues:
17
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform