>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