Thursday, January 13, 2005

Double buffering !!!

To set up automatic double buffering for a Form, you would use the following line of code in the constructor, after the InitializeComponent method call.

c#
this.SetStyle(ControlStyles.AllPaintingInWmPaint
ControlStyles.UserPaint
ControlStyles.DoubleBuffer,true);


vb
me.SetStyle(ControlStyles.AllPaintingInWmPaint OR _
ControlStyles.UserPaint OR _
ControlStyles.DoubleBuffer,true)

No comments: