Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ON KEY LABEL
Message
De
21/11/2001 04:27:32
 
 
À
21/11/2001 03:48:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00584338
Message ID:
00584344
Vues:
23
>How to use On key label eg. F1 to run a method in form?
>

ON KEY LABEL works outside the context for the Form, so references like "this", "thisform", etc cannot be used in this context. Instead, add code to the KeyPress event of the Form that traps the keystroke(s) of interest, and triggers an appropriate message; this way, the oject context is maintained consistently.

The alternative is to try to add references through the _SCREEN.ActiveForm property reference, which introduces a layer of ambiguity of reference and breaks encapsulation, requiring that all Forms implement the same common set of methods and responds identically to all the same keystrokes. THis is a bad idea.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform