Created
October 4, 2017 02:29
-
-
Save haroldcris/cd785222125227425be3d51b1cbf8bb9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Taken from https://cborrow.wordpress.com/2009/11/13/c-remove-flicker-in-mdi-applications/ | |
// | |
const int WM_NCPAINT = 0x85; | |
const int WM_SIZE = 0x05; | |
//Add this to MDI CHILD FORM | |
protected override void WndProc(ref Message m) | |
{ | |
if (m.Msg == WM_NCPAINT) | |
{ | |
if (this.WindowState == FormWindowState.Maximized) | |
return; | |
} | |
if (m.Msg == WM_SIZE) | |
{ | |
if (this.WindowState == FormWindowState.Maximized) | |
return; | |
} | |
base.WndProc(ref m); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment