在构造函数里加上以下代码:
this.doublebuffered = true;//设置本窗体 setstyle(controlstyles.userpaint, true); setstyle(controlstyles.allpaintinginwmpaint, true); // 禁止擦除背景. setstyle(controlstyles.doublebuffer, true); // 双缓冲 //setstyle(controlstyles.doublebuffer | controlstyles.optimizeddoublebuffer | controlstyles.allpaintinginwmpaint, true); //updatestyles();
以上就是简单介绍c#winform 窗体闪烁的问题的详细内容。
