I\'ve seen the following code to enable double buffering on a winform:
// Activates double buffering this.SetStyle(ControlStyles.DoubleBuffer | ControlSt
Control.DoubleBuffering performs
Control.DoubleBuffering
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, value);
so your code sets ControlStyles.UserPaint as well (which probably has no effect at this point).
ControlStyles.UserPaint