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:
00459462
Views:
25
>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 !

Peter,

I think Larry's reply is the best shot at this. First, I don't think that there is a way to do this programmatically, but even if there was, it wouldn't be something I'd recommend. Keypresses are sent as messages to the active window via the API. Disable this for one application, and you disable it for all. If an error were to occur and the application fail to restore it. You'd force the user to have to re-boot in order to restore the default behavior.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform