How to fix panel flickering when redrawing?

前端 未结 3 1750
梦如初夏
梦如初夏 2020-12-20 20:22

I have a panel that I\'ve subclassed to and have set DoubleBuffered true, I constantly need to refresh the drawing but it flickers and have no idea why.

3条回答
  •  执笔经年
    2020-12-20 20:59

    Adding the AllPaintingInWmPaint style will prevent the background from being redrawn.

    I've run across this post before and found it quite helpful. How do I enable double-buffering of a control using C# (Windows forms)?

    It might be overkill, but it works. One thing I've noticed with users is, if it appears to be running smoother and faster it is. (even if it really does take a little longer)

提交回复
热议问题