Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
F5 getting the wrong inkey() value
Message
De
22/03/2010 22:36:40
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01455965
Message ID:
01456367
Vues:
117
I wasn't using the nKeyCode because of my problem. them I discovered that lastkey() doesn't work either.

Christof's pointed correctly tom my problem. Thanks.

>You've correct code in nKeyCode variable. The LASTKEY() will be updated after .keypress() completes.
>
>>
>>In the thisform.keypress(), I have the following code (I have keypreview set to .t.):
>>
>>
>>LPARAMETERS nKeyCode, nShiftAltCtrl
>>
>>LOCAL tnKey
>>tnKey = LASTKEY()
>>
>>SUSPEND
>>
>>DO CASE
>>CASE tnKey = -4   &&F5
>>	THISFORM.cmdValidate.CLICK()
>>CASE tnKey = -5   &&F6
>>	THISFORM.cmdManual.CLICK()
>>CASE tnKey = -6   &&F7
>>	THISFORM.cmdCancel.CLICK()
>>ENDCASE
>>
>>
>>When I press F5, both the value of tnkey and nLastkey is 42! What gives?
>>
>>Thanks,
>>
>>Yossi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform