方法一:
//打开另一个窗口的同时关闭当前窗口
Thread th = new Thread(delegate () { new IndexForm().ShowDialog(); });
th.Start();
this.Close();
方法二:
IndexForm indexForm = new IndexForm();
this.Hide();
indexForm.ShowDialog();
this.Dispose();
winform打开新窗口,同时关闭原窗口的两种方法
于 2022-07-29 12:37:34 首次发布