Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
F1, F2, F3...
Message
 
À
17/03/1999 08:55:10
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
Divers
Thread ID:
00198508
Message ID:
00198509
Vues:
17
>Hi!
>
>I want to know how can I make detect F1, F2, F3, F4.... everywhere I am on a form? If I put the code in the KeyPressed event of the form, I have to put it in all box who can get the focus.. I think that a most fastest metod exist! Can you please help me!
>
>Cheers!
>
>Yannick Lepage

Set the KeyPreview property of the form to True.

This way, the Form_Key... will receive the key and the controls will receive after.

If you want to trap functions keys (F1, F2, ...) use either KeyDown or KeyUp event instead of KeyPress event.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform