I've seen the following code to enable double buffering on a winform:
// Activates double buffering
this.SetStyle(ControlStyles.DoubleBuffer |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint, true);
this.UpdateStyles();
Is this different in any way from simply setting Form.DoubleBuffering = true?
Best Answer
Control.DoubleBuffering
performsso your code sets
ControlStyles.UserPaint
as well (which probably has no effect at this point).