防止用户手动关闭窗体:
if ((e.CloseReason & System.Windows.Forms.CloseReason.UserClosing) == System.Windows.Forms.CloseReason.UserClosing)
e.Cancel = true;