Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form's Keypress Cannot Reference Thisform.object.method
Message
De
18/10/1999 20:53:03
 
 
À
18/10/1999 20:46:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00277952
Message ID:
00277956
Vues:
24
>I am using a form´s Keypress method to monitor the use of function keys which in place must activate the Click method of some buttons, depending on the key pressed by the user. To achieve this I wrote the following case statement:
>
>

>LPARAMETERS nKeyCode, nShiftAltCtrl
>do case
> case nKeyCode=keyF2
> thisform.cmdToday.click
> case nKeyCode=keyF5
> thisform.cmdAdd.click
> case nKeyCode=keyF6
> thisform.cmdEdit.click
> case nKeyCode=keyF7
> thisform.cmdDelete.click
>endcase
>

>
>NOTE: keyF1 through keyF10 are predefined constants with the corresponding codes for the function keys.
>
>During runtime the form (with the buttons) is loaded, but when I press one of the designated Keys the following
>error message appears:
>
> THISFORM can only be used within a method
>
>What am I missing and how can I designate actions to keys pressed within an active form ?

Are you using ON KEY LABELS?
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform