Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disable Keyboard buttons with Win API
Message
 
 
To
04/01/2001 13:36:22
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00459449
Message ID:
00459456
Views:
38
>Does someone know how to disable ESC and Enter in the keyboard using Win API ?
>Problem: user presses Enter (default) button to fast and it hangs a method called by click event and in other case user press ESC and interrupt the execution.
>I just want to disable the Enter and Esc keyboard buttons during 5 seconds, then enable those buttons again.
>
>Thanks in advance !

You might be able to use the KeyPreview/KeyPress property and method of your form to handle this without any API call. Set a property before the operation and check it in the KeyPress method. If the property is .T. and the key value is ESC or Enter, issue a NODEFAULT to throw out the input.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform