winform 窗體關閉枚舉類

            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,
  }
相關文章
相關標籤/搜索