Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
'Background
e.Graphics.FillRectangle(Brushes.Black, 0, 0, 210, 180)
'body
e.Graphics.FillRectangle(Brushes.Blue, 40, 10, 80, 120)
e.Graphics.DrawRectangle(Pens.Black, 40, 10, 80, 120)
'Right eye
e.Graphics.FillEllipse(Brushes.Yellow, 80, 30, 50, 50)
e.Graphics.DrawEllipse(Pens.Black, 80, 30, 50, 50)
'Left eye
e.Graphics.FillEllipse(Brushes.Yellow, 30, 30, 50, 50)
e.Graphics.DrawEllipse(Pens.Black, 30, 30, 50, 50)
'Black eyes
e.Graphics.FillEllipse(Brushes.Black, 50, 40, 10, 30) 'Left
e.Graphics.FillEllipse(Brushes.Black, 100, 40, 10, 30) 'Right
'Nose
Dim MyPolygon As Point() = {
New Point(70, 80),
New Point(90, 80),
New Point(70, 90)
}
e.Graphics.FillPolygon(Brushes.Red, MyPolygon)
e.Graphics.DrawPolygon(Pens.Black, MyPolygon)
'Mouth
e.Graphics.FillPie(Brushes.Red, 60, 80, 40, 40, 0, 180)
e.Graphics.DrawPie(Pens.Black, 60, 80, 40, 40, 0, 180)
'Tronco
e.Graphics.FillRectangle(Brushes.DarkRed, 10, 130, 140, 30)
'Left feet
e.Graphics.FillRectangle(Brushes.Brown, 40, 130, 5, 20)
e.Graphics.FillRectangle(Brushes.Brown, 50, 130, 5, 20)
e.Graphics.FillRectangle(Brushes.Brown, 60, 130, 5, 20)
'Right feet
e.Graphics.FillRectangle(Brushes.Brown, 95, 130, 5, 20)
e.Graphics.FillRectangle(Brushes.Brown, 105, 130, 5, 20)
e.Graphics.FillRectangle(Brushes.Brown, 115, 130, 5, 20)
'Moon
e.Graphics.FillEllipse(Brushes.Yellow, 140, 20, 40, 50)
e.Graphics.FillEllipse(Brushes.Black, 130, 20, 40, 50)
End Sub
End Class