Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
F1, F2, F3...
Message
 
To
17/03/1999 08:55:10
General information
Forum:
Visual Basic
Category:
Other
Title:
Miscellaneous
Thread ID:
00198508
Message ID:
00198509
Views:
16
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform