//关闭窗体
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (MessageBox.Show("确实要退出终端升级系统吗?", "终端升级系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
this.Dispose();
Application.Exit();
}
else
{
e.Cancel = true;
}
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/23109131/viewspace-673901/
,如需转载,请注明出处,否则将追究法律责任。