winfrom界面控件过多
界面摆放的控件过多,每次打开的时候 都打开的很慢 ,就跟界面刷新了一下是的!
怎么才能避免这种情况呢??
求解
[最优解释]
在类的构造方法里加入如下代码
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);//以下三行消除主界面闪烁
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.UserPaint, true);