void FormClosing(object sender, FormClosingEventArgs e)
{
this.WindowState = FormWindowState.Minimized;
e.Cancel = true;
}
但是不要使用Hide,因为Hide会循环调用FormClosing,也不要调用Visible = false; 同要会循环调用FormClosing