C# winfrom Application.Restart()启动新实例
Application.Restart()用些微软自代方法重新启动新实例,弹出来的对话框,我要怎么判断我点的“是”还是“否”??
------解决方案--------------------
Form1 frm = new Form1();
frm.ShowDialog();
if (frm.DialogResult == System.Windows.Forms.DialogResult.OK)
{
//点击ok
}
------解决方案--------------------什么意思?
if(DialogResult.Yes == new Form().ShowDialog())