Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem in keypress event
Message
De
28/04/2008 17:03:27
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Problem in keypress event
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01313639
Message ID:
01313639
Vues:
54
Have a strange problem here with the keypress event if a form, I have to capture a sequencial shift + n from the keyborad where n can be 1 to 8.
I can´t intercept the keystrokes for shft + 6 in the alphanumeric keys, and also if I try to capture the shft + 5 in the numeric keyborad it doesn't return any value (any other combination of Shift + N works) where N = 1 to 9.
Can someone please help-me to get it fixed
TIA

My code in a test form in the keypress event
LPARAMETERS nKeyCode, nShiftAltCtrl

* wait window + STR(nkeycode)+  "," + STR(nShiftAltCtrl) TIMEOUT 2 && see what's the return

DO CASE
CASE nKeyCode = 33 && shift + 1
	WAIT WINDOW "Your option was 1" TIMEOUT 2

CASE nKeyCode = 64 && shift + 2
	WAIT WINDOW "Your option was 2" TIMEOUT 2

CASE nKeyCode = 35 && shift + 3
	WAIT WINDOW "Your option was 3" TIMEOUT 2

CASE nKeyCode = 36 && shift + 4
	WAIT WINDOW "Your option was 4" TIMEOUT 2

CASE nKeyCode = 37 && shift + 5
	WAIT WINDOW "Your option was 5" TIMEOUT 2

CASE nKeyCode = 94 && shift + 6
	WAIT WINDOW "Your option was 6" TIMEOUT 2

CASE nKeyCode = 38 && shift + 7
	WAIT WINDOW "Your option was 7" TIMEOUT 2

CASE nKeyCode = 42 && shift + 8
	WAIT WINDOW "Your option was 9" TIMEOUT 2

ENDCASE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform