网上有很多是隐藏当前窗体,但是这样占用资源,效果不好,因此改进方法如下:

private void button1_Click(object sender,EventArgs e)

{

this.hide();

Form1 form=new Form1();

form.ShowDialog();

this.Dispose();//释放所有资源

}

相关文章:

  • 2021-09-27
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案