Global KeyDown Event

Is there any way to assign a global shortcut (I.E Ctrl + B) to an application without having to go through each form and apply a KeyDown event?

Who is Participating?
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
Yes...trap it via IMessageFilter.
käµfm³d 👽Commented:
IIRC, you turn on the KeyPreview property for the Form; then add a handler for the keydown event of the form.
nishant joshiTechnology Development ConsultantCommented:
you gave to add events on each form...
dvargas531Author Commented:
I want the shortcut to open a form to submit any bugs, so I need to to be available for every form on the application. I don't mind adding events to each form, but I'm running into an issue with this process. I added the KeyDown event to the form, but if the user has a grid or some other control selected the KeyDown event for the form won't fire unless the event is also added for each control.
dvargas531Author Commented:
Idle Mind, thanks I'll give it a shot
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.