protected override void OnResize(EventArgs e) { int[] numArray1 = new int[4]; numArray1[2] = this.rect.Width; numArray1[3] = this.rect.Height; int[] pMargins = numArray1; Managed.DwmExtendFrameIntoClientArea(base.Handle, ref pMargins); }
// Set window style protected override void OnResize(EventArgs e) { int[] margins = new int[] { 0, 0, rect.Width, rect.Height }; Managed.DwmExtendFrameIntoClientArea(this.Handle, ref margins); }