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());

 

你可能感兴趣的:(BO)