C#窗口防止闪烁两种方法

2021-02-15 09:17

阅读:583

标签:两种   param   div   increase   set   override   stat   protected   color   

public class PaintIncrease
    {
        public static void SetDoubleBuffered(object obj)
        {
            
            Type type = obj.GetType();
            PropertyInfo pi = type.GetProperty("DoubleBuffered",
                BindingFlags.Instance | BindingFlags.NonPublic);
            pi.SetValue(obj, true, null);
        }
    }
 protected override CreateParams CreateParams
        {
            get
            {
                
                CreateParams cp = base.CreateParams;
                cp.ExStyle |= 0x02000000;
                return cp;
            }

        }

 

C#窗口防止闪烁两种方法

标签:两种   param   div   increase   set   override   stat   protected   color   

原文地址:https://www.cnblogs.com/zhaogaojian/p/8437040.html


评论


亲,登录后才可以留言!