hotkeys

  • Thread starter Thread starter Eps
  • Start date Start date
E

Eps

anyone know how to set up hot keys in windows forms ? I have a toolbar
with new/open/save and I want to be able to press crtl + o to open a file.

any help appreciated.
 
Typically this would be done using a shortcut linked to a menu item. The
toolbar would contain items used as shortcuts to menu items. In other words,
a toolbar allows an action to be accessible through one click instead of
two, three, four, etc. clicks, or however many it would take to drop down
the menu and then select the appropriate item from the menu that appears.
Assuming that you have a MainMenu that allows access to the "open file"
action within your application, set the Shortcut property of the open
MenuItem to "CtrlO".
 
Eps said:
anyone know how to set up hot keys in windows forms ? I have a toolbar
with new/open/save and I want to be able to press crtl + o to open a file.

any help appreciated.


You could intercept the keyboard with the form.KeyDown the trhu Keycode
analysis perform whatever action you want
 
Back
Top