使用
GuanLiForm newform = new GuanLiForm();
newform.ShowDialog();
和
GuanLiForm newform = new GuanLiForm();
newform.Show();
都可以打开一个新的窗体。不同的是ShowDialog()方法窗体显示为模式窗体,而show()方法显示为无模式窗体。
使用showdialog后,必须关闭打开窗体之后才能操作原窗体。