MenuStrip的自动显示
/// <summary> /// 主界面接受F11时,显示菜单 /// 通过改写Form的ProcessCmdKey实现 /// </summary> /// <param name="msg"></param> /// <param name="KeyData"></param> /// <returns></returns> protected override bool ProcessCmdKey(ref Message msg, Keys KeyData) { if(KeyData == Keys.F11) { this.menuStrip1.Visible = !this.menuStrip1.Visible; } return base.ProcessCmdKey(ref msg, KeyData); }