三行代码解决 winform 重绘闪烁,窗口重绘效率低下的问题(转)

this.SetStyle(ControlStyles.AllPaintingInWmPaint,true);//解决闪烁
this.SetStyle(ControlStyles.Opaque ,true);//解决背景重绘问题(设置不绘制窗口背景,因为重绘窗口背景会导致性能底下)
this.SetStyle(ControlStyles.OptimizedDoubleBuffer ,true);//解决闪烁 

 

 

from: http://www.cnblogs.com/SHGF/archive/2012/04/01/2428371.html

posted @ 2013-07-16 18:00  李贰白  阅读(715)  评论(0编辑  收藏  举报