单击按钮主窗体打开子窗体,并隐藏本身 public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { this.Hide(); Form2 f = new Form2(this); f.Show(); } } 单击按钮子窗体关闭,并显示主窗体 public partial class Form2 : Form {…