How to set hotkeys for a Windows Forms form

后端 未结 8 1696
孤街浪徒
孤街浪徒 2020-12-03 05:22

I would like to set hotkeys in my Windows Forms form. For example, Ctrl + N for a new form and Ctrl + S for save. How would I do

8条回答
  •  借酒劲吻你
    2020-12-03 05:51

    If you are trying to link them to menu items in your application, then you don't need any code. On the menu item, you can simply setup the shortcut key property and it will run the same event that you have configured for your menu item click.

提交回复
热议问题