Discussion on the Flicker of C winForm Form
- 2021-12-04 10:57:19
- OfStack
Add the following code to the constructor:
this.DoubleBuffered = true;// Set up this form
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true); // Disable erasing background .
SetStyle(ControlStyles.DoubleBuffer, true); // Double buffering
//SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
//UpdateStyles();