How to double buffer .NET controls on a form?

后端 未结 12 1922
旧巷少年郎
旧巷少年郎 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 17:09

    System.Reflection.PropertyInfo aProp = typeof(System.Windows.Forms.Control)
        .GetProperty("DoubleBuffered", System.Reflection.BindingFlags.NonPublic |
        System.Reflection.BindingFlags.Instance);
    aProp.SetValue(ListView1, true, null);
    

    Ian has some more information about using this on a terminal server.

提交回复
热议问题