winform打开新窗口的同时关闭主窗口
private void FormStart()
{
Application.Run(new Form2());//运行1个新的程序窗口
}
private void button1_Click(object sender, EventArgs e)
{
Thread thread=new Thread(new ThreadStart(FormStart));
thread.Start();//定义1个线程;执行FormsStrat函数;
Application.Exit();//程序退出;
}