作者在 2007-08-11 00:01:00 发布以下内容
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
if (MessageBox.Show("是否退出本系统?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
e.Cancel = false;
}
else
{
e.Cancel = true;
}
if (!e.Cancel)
{
Application.Exit();
}
}