Private Sub Grafica_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint ' Draw a 200 by 150 pixel green rectangle. e.Graphics.DrawRectangle(Pens.Green, 10, 10, 200, 150) ' Draw a blue square e.Graphics.DrawRectangle(Pens.Blue, 30, 30, 150, 150) ' Draw a 150 pixel diameter red circle. e.Graphics.DrawEllipse(Pens.Red, 0, 0, 150, 150) ' Draw a 250 by 125 pixel yellow oval. e.Graphics.DrawEllipse(Pens.Yellow, 20, 20, 250, 125) End Sub |