VB.net 双缓冲绘图方法

 Public g As BufferedGraphics
   g = BufferedGraphicsManager.Current.Allocate(PictureBox1.CreateGraphics, PictureBox1.DisplayRectangle)
   g.Graphics.DrawString($"X={p.X}{vbCrLf}Y={p.Y}", Me.Font, Brushes.Red, x * dsize.Width, y * dsize.Height)
                    g.Graphics.DrawRectangle(New Pen(Color.Green), New Rectangle(x * dsize.Width, y * dsize.Height, dsize.Width, dsize.Height))
       g.Render()

 

你可能感兴趣的:(VB.net 双缓冲绘图方法)