PictureBox 双缓冲防止闪屏


Bitmap bm = new Bitmap(this.pbTraffic.Image); BufferedGraphicsContext current = BufferedGraphicsManager.Current; BufferedGraphics buf = current.Allocate(pbTraffic.CreateGraphics(), pbTraffic.DisplayRectangle); buf.Graphics.Clear(pbTraffic.BackColor); buf.Graphics.DrawImage(bm, mx, my, pbTraffic.Width, pbTraffic.Height); buf.Render(pbTraffic.CreateGraphics());
原文地址:https://www.cnblogs.com/94cool/p/3386248.html