Archive for January 1st, 2008
C# Enabling Double buffering for a form.
by brian on Jan.01, 2008, under .NET, GUI, c#, coding
Ran across a simple how-to to enable double buffering for a form. Just put the code snippet in the form’s constructor after the InializeComponents
this.SetStyle(
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer,true);
This gets rid of flicker, it also makes draw a tad slower.
Found the code at: http://www.bobpowell.net/doublebuffer.htm Thanks Bob Powell!
