switch (e.CloseReason) { case CloseReason.None: break; case CloseReason.WindowsShutDown: break; case CloseReason.MdiFormClosing: break; case CloseReason.UserClosing: break; case CloseReason.TaskManagerClosing: break; case CloseReason.FormOwnerClosing: break; case CloseReason.ApplicationExitCall: break; }
public enum CloseReason { None, WindowsShutDown, MdiFormClosing, UserClosing, TaskManagerClosing, FormOwnerClosing, ApplicationExitCall, }