ContextMenusStrip 和MenusStrip的区别
ContextMenusStrip 是常用语托盘的上下文菜单,MenusStrip是菜单栏
ContextMenuStrip cms=new System.Windows.Forms.ContextMenuStrip();
ToolStripMenuItem conmenus1 = new ToolStripMenuItem("打开窗体");
ToolStripMenuItem conmenus2 = new ToolStripMenuItem("关闭窗体");
ContextMenusStrip不能应用Controls.Add(cms)方法
MenuStrip ms = new MenuStrip();
ToolStripMenuItem menus1 = new ToolStripMenuItem("窗体");
ToolStripMenuItem menus1_1 = new ToolStripMenuItem("窗体_子窗体");
menus1.DropDownItems.Add(menus1_1);
this.Controls.Add(ms)