Enabling Double Buffering

后端 未结 4 989
抹茶落季
抹茶落季 2020-12-22 04:35

I\'ve seen the following code to enable double buffering on a winform:

// Activates double buffering 
this.SetStyle(ControlStyles.DoubleBuffer |
   ControlSt         


        
4条回答
  •  有刺的猬
    2020-12-22 04:59

    Control.DoubleBuffering performs

    SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, value);
    

    so your code sets ControlStyles.UserPaint as well (which probably has no effect at this point).

提交回复
热议问题