实现思想:新建一个线程用来显示Form2,Form1的消息循环线程就可以结束了。

private void Button1_MouseClick(object sender, MouseEventArgs e)
{
    Thread t = new Thread(new ThreadStart(delegate { Application.Run(new Form2()); }));
    t.Start();
    this.Dispose(true);
}


 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-03-09
  • 2022-12-23
  • 2021-09-02
猜你喜欢
  • 2021-12-18
  • 2021-10-26
  • 2021-11-02
  • 2021-09-05
  • 2021-10-03
  • 2021-09-13
  • 2021-12-21
相关资源
相似解决方案