How to double buffer .NET controls on a form?

后端 未结 12 1912
旧巷少年郎
旧巷少年郎 2020-11-22 16:21

How can I set the protected DoubleBuffered property of the controls on a form that are suffering from flicker?

12条回答
  •  长情又很酷
    2020-11-22 16:51

    One way is to extend the specific control you want to double buffer and set the DoubleBuffered property inside the control's ctor.

    For instance:

    class Foo : Panel
    {
        public Foo() { DoubleBuffered = true; }
    }
    

提交回复
热议问题