using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace HXX.Scanner.Client { public class DoubleBufferedPanel : Panel { public DoubleBufferedPanel() { // 为Panel开启双缓冲 this.DoubleBuffered = true; this.SetStyle( ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.DoubleBuffer, true); this.UpdateStyles(); } } }