算了 帮你找下了
private void Tool_Exit_Click(object sender, EventArgs e)
{
DialogResult rl = MessageBox.Show("确定退出?", "退出", MessageBoxButtons.YesNo,MessageBoxIcon.Question );
if (rl == DialogResult.Yes)
{
Application.ExitThread ();//关闭项目
//this.Close();
}
else
{
// return false;
}
}
private void Main_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult rl = MessageBox.Show("确定退出?", "退出", MessageBoxButtons.YesNo,MessageBoxIcon.Question );
if (rl == DialogResult.Yes)
{
Application.ExitThread ();
}
else
{
e.Cancel = true;
// return false;
}
}
这样就可以了
private void Tool_Exit_Click(object sender, EventArgs e)
{
DialogResult rl = MessageBox.Show("确定退出?", "退出", MessageBoxButtons.YesNo,MessageBoxIcon.Question );
if (rl == DialogResult.Yes)
{
Application.ExitThread ();//关闭项目
//this.Close();
}
else
{
// return false;
}
}
private void Main_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult rl = MessageBox.Show("确定退出?", "退出", MessageBoxButtons.YesNo,MessageBoxIcon.Question );
if (rl == DialogResult.Yes)
{
Application.ExitThread ();
}
else
{
e.Cancel = true;
// return false;
}
}
这样就可以了
曾经有双翅膀,我没用她飞上蓝天,丢锅里炖汤了!