Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping duration of keypress event in VFP?
Message
From
21/04/2013 06:00:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/04/2013 23:46:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01571521
Message ID:
01571552
Views:
72
>Hey guys,
>
>I'm a little frustrated here. Does anyone know if it's possible, and how, to trap the duration of a key-press event in VFP? I have various versions available (up to 9) but cannot find any way of doing this. I'm assuming this is not supported via general VFP functions but I'm looking for any solution with decent resolution (on the order of 5ms or there about). Any thoughts? I'm attempting to build a Morse code trainer in VFP as I've not really found a single piece of S/W out there that does all the things I'd like in a true Morse trainer. If anyone's interested in this, I plan on making this GNU/Open Source with detailed plans for a USB interface to a Morse key. To be able to do this properly in VFP will require being able to detect the length (in ms) of a key-press event. If it turns out there's no obvious way to do this in VFP then I'll have to (ugh :p) do this in VB.

If you could bind it to a mouse click, then you could record the time (in milliseconds resolution) using seconds() in mouseDown() and again in mouseUp() and check the difference.

Or you could use some ActiveX which would have a KeyDown and KeyUp event to the same effect.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform