Public Class Form1 Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click Dim paper As Graphics paper = PictureBox1.CreateGraphics() paper.Clear(Color.White) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim paper As Graphics Dim mypen As Pen paper = PictureBox1.CreateGraphics() mypen = New Pen(Color.Blue, 3) paper.DrawRectangle(mypen, 30, 10, PictureBox1.Width - 2 * 30, _ PictureBox1.Height - 2 * 10) 'MessageBox.Show("Rectangle has been drawn") paper.DrawEllipse(mypen, 30, 10, PictureBox1.Width - 2 * 30, _ PictureBox1.Height - 2 * 10) 'MessageBox.Show("Ellipse has been drawn") paper.DrawLine(mypen, 20, 30, 200, 300) End Sub End Class