Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect if the shift key (only) is pressed
Message
From
24/07/2013 18:03:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
How to detect if the shift key (only) is pressed
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01579180
Message ID:
01579180
Views:
172
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
Next
Reply
Map
View

Click here to load this message in the networking platform