Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting the shift state of keys in realtime
Message
From
07/02/2019 10:24:02
 
 
To
07/02/2019 01:16:23
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01665968
Message ID:
01666025
Views:
41
>>>>>>Me again,
>>>>>>
>>>>>>I have been playing around with the WinApi's getKeyState and GetKeyboardState function to determine when the Shift, Ctrl, or Alt key are pressed when a routine occurs. But the results tend to be random. Does anyone have a solution that returns the state of these keys? FYI. the routine is occurring in a TImer. I am attempt to implement a more dynamic tooltip that would display the content based on the state of the shift state and the content the mouse happens to be over at the time.
>>>>>>
>>>>>>Any suggestion are welcome.
>>>>>
>>>>>I know it doesn't answer your question, but have you checked the KeyPress event (that applies to various controls and form class) ?
>>>>
>>>>Oh.
>>>>I failed to mention that the Tooltip routine begins with the MouseEnter event. There it starts a timer. After a duration the tooltip appears (approx 1 sec.). It is then that I wish to check the shift state to determine the content of the tooltip. Therefore it needs to check and display the proper content.
>>>
>>>While it sounds interesting - this seems to be a non standard interface. Can you do it different? Standard TT and additional information via Rightclick, for example? Something that a user might expect without special training?
>>
>>Perhaps so. But the purpose is to provide addition information in the TT as to how to use the feature. This may include the shift states that alter the way the menu item reacts. This is like over commenting of the code issue. I would prefer the instructions being available when I need it and not have to search the documentation for the answer (or worse, the web). but that just me.
>
>I've had this idea ages ago. It was no success. It was to much information there. If it is for yourself, maybe.

My thought too. I have considering just providing a link to a help file. Because once learned the extensive information would be overwhelming and unnecessary. The TT should only provide information relative to task current at hand.
Greg Reichert
Previous
Reply
Map
View

Click here to load this message in the networking platform