pvg1975
asked on
Capturing F keystroke inside a form in VB.NET
Hi,
Is it possible to capture, for example, F5 keystroke on a form even if the focus is on a textbox?
I need to capture F5 on a form independently of the control that has the focus.
Thanks!
Is it possible to capture, for example, F5 keystroke on a form even if the focus is on a textbox?
I need to capture F5 on a form independently of the control that has the focus.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There are methods to do it without enabling KeyPreview...
Via ProcessCmdKey():
https://www.experts-exchange.com/questions/21423963/Newbie-question-use-F10-to-make-save-happen.html#21423963
Or ProcessKeyPreview(): *not as pretty
https://www.experts-exchange.com/questions/22481177/Vb-net-Hot-Key-Buttons.html#18819244
Via ProcessCmdKey():
https://www.experts-exchange.com/questions/21423963/Newbie-question-use-F10-to-make-save-happen.html#21423963
Or ProcessKeyPreview(): *not as pretty
https://www.experts-exchange.com/questions/22481177/Vb-net-Hot-Key-Buttons.html#18819244
ASKER
Thanks guys!