ToastNotifications.FormAnimator.Form_Closing C# (CSharp) Method

Form_Closing() private method

Animates the form automatically when it closes
private Form_Closing ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
return void
        private void Form_Closing(object sender, CancelEventArgs e)
        {
            if (!e.Cancel)
            {
                // MDI child forms do not support transparency so do not try to use the Fade method.
                if (_form.MdiParent == null || _method != AnimationMethod.Fade)
                {
                    NativeMethods.AnimateWindow(_form.Handle, _duration, AwHide | (int)_method | (int)_direction);
                }
            }
        }