Home >Backend Development >C#.Net Tutorial >A brief introduction to the problem of C#winForm form flickering
The editor below will bring you a brief discussion on the problem of winForm form flickeringC#. The editor thinks it is quite good, so I will share it with you now and give it as a reference for everyone. Let’s follow the editor and take a look.
Add the following code to ConstructionFunction:
this.DoubleBuffered = true;//设置本窗体 SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); // 禁止擦除背景. SetStyle(ControlStyles.DoubleBuffer, true); // 双缓冲 //SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); //UpdateStyles();
The above is the detailed content of A brief introduction to the problem of C#winForm form flickering. For more information, please follow other related articles on the PHP Chinese website!