Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ESCAPE Data Entry with the Escape key?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00774280
Message ID:
00774283
Vues:
10
Cecil,

You can set Cancel property of cmdCancel to .T. and Click() event of this button will be triggered when user press Escape. LASTKEY() function will return 27 (ESC) in this case.

>What would be a good way to escape entry in a form?
>
>I am currently trying toi put code in the Keypress event of a certain field, so that if the user hits the ESCAPE key, that the data entry form will close up (go gray) and will execute the ThisForm.cmdCancel.Click() method.
>
>However, it appears that you can't do this as easily as I had thought. I received an error in which I was told by FoxPro (VFP 7) that you can't use the ThisForm.cmdCancel.Click method.
>
>The specific error was:
>
>"ThisForm can only be used from within a form."
>
>Any ideas?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform