Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label1.Text = "Emoji Arc Practice"
End Sub
Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
'Circle
e.Graphics.FillEllipse(Brushes.Yellow, 30, 20, 80, 80)
e.Graphics.DrawEllipse(Pens.Black, 30, 20, 80, 80)
'Shades
e.Graphics.FillRectangle(Brushes.Gray, 25, 40, 90, 10)
e.Graphics.DrawRectangle(Pens.Black, 25, 40, 90, 10)
'Rectangles
e.Graphics.FillRectangle(Brushes.Gray, 35, 50, 30, 20)
e.Graphics.DrawRectangle(Pens.Black, 35, 50, 30, 20)
e.Graphics.FillRectangle(Brushes.Gray, 75, 50, 30, 20)
e.Graphics.DrawRectangle(Pens.Black, 75, 50, 30, 20)
e.Graphics.DrawArc(Pens.Black, 50, 75, 40, 10, 0, 180)
End Sub
Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
End Sub
End Class
Imports System.Reflection.Emit
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label1.Text = "Emoji Lab"
End Sub
Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
'Draws a line below the label
Dim labelBottom As Integer = Label1.Bottom + 1
e.Graphics.DrawLine(Pens.Black, Label1.Left, labelBottom, Label1.Right, labelBottom)
'Stop light emoji
Dim Big As Integer = 2
'Rectangle Fill Grey
e.Graphics.FillRectangle(Brushes.Gray, 20 * Big, 20 * Big, 60 * Big, 135 * Big)
'Rectangle Black Pen
e.Graphics.DrawRectangle(Pens.Black, 20 * Big, 20 * Big, 60 * Big, 135 * Big)
'Red color elipse Pen
e.Graphics.FillEllipse(Brushes.Red, 30 * Big, 25 * Big, 40 * Big, 40 * Big)
'Black color elipse Pen for red light
e.Graphics.DrawEllipse(Pens.Black, 30 * Big, 25 * Big, 40 * Big, 40 * Big)
'Yellow color elipse Pen
e.Graphics.FillEllipse(Brushes.Yellow, 30 * Big, 67 * Big, 40 * Big, 40 * Big)
'Black color elipse Pen for Yellow light
e.Graphics.DrawEllipse(Pens.Black, 30 * Big, 67 * Big, 40 * Big, 40 * Big)
'Green color elipse Pen
e.Graphics.FillEllipse(Brushes.Green, 30 * Big, 110 * Big, 40 * Big, 40 * Big)
'Black color elipse Pen for Green light
e.Graphics.DrawEllipse(Pens.Black, 30 * Big, 110 * Big, 40 * Big, 40 * Big)
'Cookie Emoji
'Fill Ellipse brown
e.Graphics.FillEllipse(Brushes.SandyBrown, 100 * Big, 25 * Big, 45 * Big, 45 * Big)
'Pens Black outline cookie
e.Graphics.DrawEllipse(Pens.Black, 100 * Big, 25 * Big, 45 * Big, 45 * Big)
Dim ChocolateHeight As Integer = 10
'Chocolate chips
'Array of chocolate chip coordinates
Dim chocolateChips As Point() = {
New Point(110 * Big, 32 * Big),
New Point(115 * Big, 55 * Big),
New Point(130 * Big, 43 * Big)
}
'Loops through the array for chocolate chips
For Each chip As Point In chocolateChips
'Fill
e.Graphics.FillEllipse(Brushes.Brown, chip.X, chip.Y, ChocolateHeight * Big, ChocolateHeight * Big)
'Outline
e.Graphics.DrawEllipse(Pens.Black, chip.X, chip.Y, ChocolateHeight * Big, ChocolateHeight * Big)
Next
End Sub
End Class
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
'Pacman 1
'Fills yellow pacman
e.Graphics.FillPie(Brushes.Yellow, 20, 20, 80, 80, 45, 280)
'Black outline
e.Graphics.DrawPie(Pens.Black, 20, 20, 80, 80, 45, 280)
'Eye circle fill
e.Graphics.FillEllipse(Brushes.Black, 45, 30, 20, 20)
'Eye circle outline
e.Graphics.DrawEllipse(Pens.Black, 45, 30, 20, 20)
'Circle
e.Graphics.FillEllipse(Brushes.White, 90, 55, 15, 15)
e.Graphics.DrawEllipse(Pens.Black, 90, 55, 15, 15)
'Ghost
Dim points As Point() = {
New Point(130, 40),
New Point(130, 90),
New Point(140, 80),
New Point(150, 90),
New Point(160, 80),
New Point(170, 90),
New Point(180, 80),
New Point(180, 40),
New Point(130, 40)
}
' Fill and draw ghost
e.Graphics.FillPolygon(Brushes.Purple, points)
e.Graphics.DrawPolygon(Pens.Black, points)
'Arc
e.Graphics.FillPie(Brushes.Purple, 130, 20, 50, 50, 90, 270)
'Eyes
e.Graphics.FillEllipse(Brushes.White, 135, 35, 17, 15)
e.Graphics.FillEllipse(Brushes.Blue, 134, 37, 10, 10)
e.Graphics.DrawEllipse(Pens.Black, 135, 35, 17, 15)
e.Graphics.FillEllipse(Brushes.White, 160, 35, 17, 15)
e.Graphics.FillEllipse(Brushes.Blue, 159, 37, 10, 10)
e.Graphics.DrawEllipse(Pens.Black, 160, 35, 17, 15)
'Circles
e.Graphics.FillEllipse(Brushes.White, 200, 55, 15, 15)
e.Graphics.DrawEllipse(Pens.Black, 200, 55, 15, 15)
e.Graphics.FillEllipse(Brushes.White, 240, 55, 15, 15)
e.Graphics.DrawEllipse(Pens.Black, 240, 55, 15, 15)
'Pacman 2
'Fill yellow
e.Graphics.FillPie(Brushes.Yellow, 250, 20, 80, 80, 220, 280)
'Black outline
e.Graphics.DrawPie(Pens.Black, 250, 20, 80, 80, 220, 280)
'Eye pacman 2
'Eye circle fill
e.Graphics.FillEllipse(Brushes.DeepSkyBlue, 280, 30, 20, 20)
'Eye circle outline
e.Graphics.DrawEllipse(Pens.Black, 280, 30, 20, 20)
'Bow pacman
'Pie 1
e.Graphics.FillPie(Brushes.Pink, 285, 0, 45, 45, 180, 45)
e.Graphics.DrawPie(Pens.Black, 285, 0, 45, 45, 180, 45)
'Pie 2
e.Graphics.FillPie(Brushes.Pink, 285, 0, 45, 45, 0, 45)
e.Graphics.DrawPie(Pens.Black, 285, 0, 45, 45, 0, 45)
'Circle
e.Graphics.FillEllipse(Brushes.Pink, 305, 20, 5, 5)
e.Graphics.DrawEllipse(Pens.Black, 305, 20, 5, 5)
End Sub
End Class