How to fix nested winform control flicker issues

前端 未结 4 1429
忘了有多久
忘了有多久 2021-02-08 02:39

I am currently working on a program that uses a fairly complex structure of nested winform controls which changes dynamically as a user makes certain selections. To go into more

4条回答
  •  清歌不尽
    2021-02-08 03:07

    If you are using WinForms 2+ then you can just set the 'Control.DoubleBuffer' property on the control to true (in the designer even).

    With framework 2, setting DoubleBuffered sets the 3 flags : OptimizedDoubleBuffer, AllPaintingInWmPaint, and and another that I forgot, 'UserPaint' perhaps.

    Also, do look at the BeginUpdate/EndUpdate as mentioned by @yetapb.

提交回复
热议问题