How to fix nested winform control flicker issues

前端 未结 4 1428
忘了有多久
忘了有多久 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:17

    Suspend/ResumeLayout isn't your problem here. That only suspends automatic layout, the kind that is triggered by the Anchor and Dock properties. Double-buffering can't fix your problem either, that only suppresses flicker in each individual control. Your real problem is that you are updating too many controls at the same time, each will take its turn to paint itself and that takes time.

    What you need is a different kind of double-buffering, compositing. Check out if the solution in this thread solves your problem.

提交回复
热议问题