private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult dr = MessageBox.Show("是否关闭?","提示!",MessageBoxButtons.OKCancel);
if(dr!=DialogResult.OK)
{
e.Cancel = true;
}
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult dr = MessageBox.Show("是否关闭?","提示!",MessageBoxButtons.OKCancel);
if(dr!=DialogResult.OK)
{
e.Cancel = true;
}
}