Home  >  Article  >  Backend Development  >  A brief introduction to the problem of C#winForm form flickering

A brief introduction to the problem of C#winForm form flickering

黄舟
黄舟Original
2017-03-25 13:23:321473browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn