code_junkie

How do i enable double-buffering of a control using C# (Window forms)?

Nov 11th, 2011
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. this.DoubleBuffered = true;
  2. this.SetStyle(ControlStyles.UserPaint |
  3. ControlStyles.AllPaintingInWmPaint |
  4. ControlStyles.ResizeRedraw |
  5. ControlStyles.ContainerControl |
  6. ControlStyles.OptimizedDoubleBuffer |
  7. ControlStyles.SupportsTransparentBackColor
  8. , true);
  9.  
  10. System.Windows.Forms.Form myForm = new System.Windows.forms.Form();
  11. myForm.DoubleBuffered = true;
Add Comment
Please, Sign In to add comment