All what I did is to write a class which inherits from Panel Class, and in the constructor set the DoubleBuffered to true and set the appropriate control styles.
Public Class DoubleBufferPanel
Public Sub New()
Me.DoubleBuffered = True
SetStyle(ControlStyles.AllPaintingInWmPaint Or _
ControlStyles.DoubleBuffer Or ControlStyles.ResizeRedraw Or ControlStyles.UserPaint, True)
After building the project, we should be able to see the DoubleBufferPanel component in the ToolBox.
|Double buffer Panel|
Then drag and drop the panel and used it. The problem is solved. It's so simple.
public class DoubleBufferPanel : Panel
// Set the value of the double-buffering style bits to true.
this.DoubleBuffered = true;
this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint |