I have an explorer style application (with 2 user controls - tree and list, toolbar etc..)
I need to know when the user presses the "Ctrl" key in any place in the application.
What is the way to do it?
Thanks Sigal
Printable View
I have an explorer style application (with 2 user controls - tree and list, toolbar etc..)
I need to know when the user presses the "Ctrl" key in any place in the application.
What is the way to do it?
Thanks Sigal
set the Keypreview property of the form to true and trap all keypress, keydown, keyup event at the Form_Keypress event handler level
sample:
private Sub Form_KeyDown(KeyCode as Integer, Shift as Integer)
If Shift And vbKeyControl = vbKeyControl then
MsgBox "control pressed"
End If
End Sub
Thanks but i have more then two forms and i don't want to define the Form_KeyDown routine in every form
I want that the main form will catch the key of its child forms.
check out http://www.vbaccelerator.com/codelib...mr/hotkeyr.htm
It deals with registering application wide hotkeys.