Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect if the shift key (only) is pressed
Message
De
24/07/2013 18:03:20
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
How to detect if the shift key (only) is pressed
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01579180
Message ID:
01579180
Vues:
173
I would like to know how to detect if the shift key is pressed when on a form and control. Basically, i want to change the caption of a control if the control has focus or the mouse is over the object. I am sucessfully using MouseEnter/Move/Leave and checking the nShift parameter. Also, if the the control has focus and the user presses shift, I want to change the caption.

If I shift+tab, i can detect the shift keypress, but that also moves the focus to another control. I just want to detect if the keypress occurs when it has focus. The Keypress() method only seems to fire if another key is pressed as well.
David
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform