• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

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?

Thanks
0
dvargas531
Asked:
dvargas531
1 Solution
 
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.
0
 
nishant joshiTechnology Development ConsultantCommented:
you gave to add events on each form...
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Yes...trap it via IMessageFilter.
0
 
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.
0
 
dvargas531Author Commented:
Idle Mind, thanks I'll give it a shot
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now