private void AutoCloseDialog_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (Environment.OSVersion.Version.Major >= 6)
     {
         AutoCloseDialogHelper.AnimateWindow(this.Handle, CLOSE_TIME,
                                             AutoCloseDialogHelper.AW_HIDE | AutoCloseDialogHelper.AW_BLEND);
     }
 }
 private void AutoCloseDialog_Load(object sender, EventArgs e)
 {
     //关于Environment.OSVersion https://stackoverflow.com/questions/2819934/detect-windows-version-in-net
     if (Environment.OSVersion.Version.Major >= 6)
     {
         //AutoCloseDialogHelper.AnimateWindow(this.Handle, SHOW_TIME,
         //    AutoCloseDialogHelper.AW_SLIDE | AutoCloseDialogHelper.AW_ACTIVATE | AutoCloseDialogHelper.AW_VER_NEGATIVE);
         AutoCloseDialogHelper.AnimateWindow(this.Handle, SHOW_TIME, AutoCloseDialogHelper.AW_BLEND);
     }
 }