CloverExamplePOS.OverlayForm.OnFormClosing C# (CSharp) Method

OnFormClosing() protected method

protected OnFormClosing ( FormClosingEventArgs e ) : void
e System.Windows.Forms.FormClosingEventArgs
return void
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            // Restore owner
            this.Owner.LocationChanged -= ParentLocationChanged;
            this.Owner.ClientSizeChanged -= ParentSizeChanged;
            if (!this.Owner.IsDisposed && Environment.OSVersion.Version.Major >= 6)
            {
                int value = 1;
                DwmSetWindowAttribute(this.Owner.Handle, DWMWA_TRANSITIONS_FORCEDISABLED, ref value, 4);
            }
            base.OnFormClosing(e);
            this.Dispose();
        }