Prevent Resize Flicker

ForeverZer0 Jun 5th, 2012 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 // Paste this code within the class for the form to prevent
  2.                 // controls from flickering while form is resizing
  3.                 protected override CreateParams CreateParams
  4.                 {
  5.                         get
  6.                         {
  7.                                 CreateParams cp = base.CreateParams;
  8.                                 cp.ExStyle |= 0x02000000;  // Turn on WS_EX_COMPOSITED
  9.                                 return cp;
  10.                         }
  11.                 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand