Public Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load PictureBox1.Image = New Bitmap(PictureBox1.Width, PictureBox1.Height) End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Using g As Graphics = Graphics.FromImage(PictureBox1.Image) g.DrawLine(Pens.Red, 100, 100, 200, 200) End Using PictureBox1.Invalidate() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Using g As Graphics = Graphics.FromImage(PictureBox1.Image) g.DrawLine(Pens.Blue, 200, 200, 300, 300) End Using PictureBox1.Invalidate() End Sub End Class