Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I _Need_ OKLs
Message
 
À
02/07/1999 19:49:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00237089
Message ID:
00237092
Vues:
12
Harry,

If you want F9 to be the hotkey to a button do it in the form's keypress event with the KeyPreview for the fomr set to .T.;
* KeyPress
LPARAMETERS nKeyCode ...
IF nKeyCode = -8 && F9
   NODEFAULT && Stop VFP key processing
   Thisform.Whatever.Click()
ENDIF
Now why doesn't OKL work. Because the command assinged to the OKL is being run outside of the form and therefore the Thisform reference means nothing. Also OKL's are intercomand interrupts, that means they will interrupt running code. In VFP the only valid reason to use an OKL is to interrupot running code and even that can be accomplished without using an OKL.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform