Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disable Keyboard buttons with Win API
Message
 
À
04/01/2001 13:36:22
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00459449
Message ID:
00463233
Vues:
39
Peter-
Perhaps this isn't the best approach? I'd hesitate to disable keys, and you may not need to in this case.

Enter: If the second press of Enter is again triggering the default button, can your method (called from the Click() code) perhaps switch focus (not to another button), turn off the Default property on the button, do its stuff, and then reinstate the Default property? Of course this isn't foolproof, but it sounds like it might address what's happening here.

Esc: It sounds like you don't have the Cancel property of any button set. What you can do is, in the above paragraph, also disable Esc using Set Escape Off and reinstate it at the end of the process. On the other hand, if you are using cmdSomeButton.Cancel = .T., set that to .F. during your processing.

Hope that helps ...
zahid

>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 !
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform