Public Class Form1
Dim Painting As Bitmap
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Painting = New Bitmap(400, 400)
Dim G As Graphics = Graphics.FromImage(Painting)
Dim x, y As Integer
x = 0
y = 0
G.FillEllipse(Brushes.Blue, x + 0, y + 0, x + 100, y + 94)
G.DrawEllipse(Pens.Black, x + 0, y + 0, x + 100, y + 94)
G.FillEllipse(Brushes.White, x + 6, y + 26, x + 88, y + 67)
G.FillEllipse(Brushes.White, x + 33, y + 15, x + 17, y + 25)
G.DrawEllipse(Pens.Black, x + 33, y + 15, x + 17, y + 25)
G.FillEllipse(Brushes.White, x + 50, y + 15, x + 17, y + 25)
G.DrawEllipse(Pens.Black, x + 50, y + 15, x + 17, y + 25)
G.FillEllipse(Brushes.Black, x + 40, y + 23, x + 7, y + 10)
G.DrawLine(Pens.Black, x + 54, y + 28, x + 60, y + 28)
G.DrawLine(Pens.Black, x + 54, y + 28, x + 60, y + 24)
G.DrawLine(Pens.Black, x + 54, y + 28, x + 60, y + 32)
G.FillEllipse(Brushes.Red, x + 45, y + 35, x + 10, y + 10)
G.DrawLine(Pens.Black, x + 50, y + 45, x + 50, y + 60)
G.DrawLine(Pens.Black, x + 21, y + 47, x + 42, y + 50)
G.DrawLine(Pens.Black, x + 79, y + 47, x + 58, y + 50)
G.DrawLine(Pens.Black, x + 20, y + 53, x + 42, y + 53)
G.DrawLine(Pens.Black, x + 58, y + 53, x + 80, y + 53)
G.DrawLine(Pens.Black, x + 21, y + 59, x + 42, y + 56)
G.DrawLine(Pens.Black, x + 79, y + 59, x + 58, y + 56)
G.DrawString("3", New Font(Me.Font.Name, 9), Brushes.Black, x + 50, y + 60)
Me.BackgroundImageLayout = ImageLayout.None
Me.BackgroundImage = Painting
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
沒有留言:
張貼留言