(1)首先消息响应为:FormClosing
(2)在其实现中写的代码如下:他居然就给参数赋值,OX!
private void SeverPlugIn_FormClosing(object sender, FormClosingEventArgs e)
{
if (MessageBox.Show("确定要退出吗?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
e.Cancel = false;
}
else
{
e.Cancel = true;
}
}