代码如下 | 复制代码 |
this.DoubleBuffered =true;//设置本窗体
SetStyle(ControlStyles.UserPaint,true);
SetStyle(ControlStyles.AllPaintingInWmPaint,true);// 禁止擦除背景.
SetStyle(ControlStyles.DoubleBuffer,true);// 双缓冲
//SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
//UpdateStyles(); |