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

 

posted @   94cool  阅读(1907)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示