急!求助——winform程序加载时控件闪烁严重
求各位大虾帮助
winform程序界面有70多个控件(Lable 和 TextBox),在ShowDialog() 时,这些控件显示得特别慢,好像是一条线一条线画出来的,而且还重重叠叠的,看起来特别的闪。
在网上搜索了好多方法,都不管用;
1、this.SuspendLayout(); .... this.ResumeLayout(false);
2、双缓冲 DoubleBuffered true...
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景.
SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲
3、……
SOS……。