c# .Net double buffering — plus a little
by brian on Jan.08, 2008, under .NET, GUI, Uncategorized, c#, c# coding GUI, coding
It seems I left out something that helps the quality of the .Net provided form double buffering when you are doing custom drawing. Just override OnPaintBackground and leaving it blank. This prevents the background from being momentarily drawn when you don’t want it to be.
so again here’s how to enable double buffering on the form:
this.SetStyle(
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer,true);
And then the override
protected override void OnPaintBackground(PaintEventArgs e)
{
}
Leave a Reply
You must be logged in to post a comment.

September 6th, 2010 on 12:43 pm
Buy:Propecia.Tramadol.Zithromax.Viagra Professional.Cialis Soft Tabs.VPXL.Levitra.Viagra Soft Tabs.Maxaman.Super Active ED Pack.Viagra Super Force.Cialis Professional.Viagra Super Active+.Cialis Super Active+.Viagra.Cialis.Soma….