Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keypress ESC
Message
De
09/04/2003 21:03:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
09/04/2003 20:47:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00775837
Message ID:
00775840
Vues:
11
>hi,
>
>i want to close my form if i pressed "ESC" key,
>
>how do i do that?

One way is to have a button with a caption similar to "Close", and set the property "Cancel" to .T. Pressing ESC will activate the click event of the button.

If you don't want a special button, you can also use the Form.KeyPress() Event. You will also have to change Form.KeyPreview.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform