I have the following code:
private void form1_closing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
this.Hide();
}
我想要一个按钮来关闭表单,但不触发该事件。我该怎么做?
按钮的代码:
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
我希望上面的按钮可以关闭表单而不是隐藏它。
this.Close(); } - Hunter Mitchell
FormClosing
事件。 - Servy