2 simple ways (there can be can be more like using APIs etc.), 1) Use the MenuStrip > ToolStripMenuItem control and set the shortcut 2) Use the Form's KeyDown/KeyUp event (but set Form's KeyPreview property to true)
On Fri, Sep 11, 2009 at 11:18 PM, [email protected] < [email protected]> wrote: > > Hi all, > > I am developing an application where I want a dialog to open which > will only by people who know the key combination as this will be where > the settings for the program will be shown. > > I want the key combination to work as long as the program has focus. > > I have looked it up on the Internet but all I seem to be able to > manage is using a KeyEvent or KeyDownEvent on an item like the text > box which isn't what I want, I want the key combination to work as > long as the Windows Form has focus. > > For example the key combination would be Ctrl + Alt + 1 > > Thank you for any help in this matter. >
