winform窗体全局快捷键

 

 

 

 

 

 4、使用ShortcutKeys组合键

  this.toolStripMenuItem1.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Enter)));

5、使用ItemClick事件调用想调用的方法

  private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            btnSubmit_Click(null, null);
        }
posted @ 2021-08-02 19:17  兮去  阅读(641)  评论(0编辑  收藏  举报