新建两个窗体Form1、Form2,Form1添加button,双击button添加单击事件,利用ShowDialog()方法实现。
Form2 f2 = new Form2(); f2.ShowDialog();