Dim strSize As Integer
'Play the chimes sound.
My.Computer.Audio.Play(My.Resources.chimes, AudioPlayMode.WaitToComplete)
'Draw a face
Dim intSize As Integer = Convert.ToInt32(strSize)
If intSize = 0 Then
intSize = 40
End If
If intSize < 28 Then
intSize = 28
End If
If intSize > 45 Then
intSize = 45
End If
DrawIt(intSize)
End Sub
Function DrawIt(ByVal depth)
Dim objBitmap As Bitmap = New Bitmap(50, 50)
Dim g As Graphics = Graphics.FromImage(objBitmap)
Dim objBrush As SolidBrush = New SolidBrush(Color.White)
Dim objBlackBrush As SolidBrush = New SolidBrush(Color.Black)
Dim objYellowBrush As SolidBrush = New SolidBrush(Color.Yellow)
g.FillRectangle(New SolidBrush(Color.White), 0, 0, 50, 50)
'Face
g.FillEllipse(Brushes.Yellow, 0, 0, 50, 50)
'Eyes
g.FillEllipse(Brushes.Black, 10, 15, 10, 10)
g.FillEllipse(Brushes.Black, 30, 15, 10, 10)
'Smile
Dim aPoints(3) As Point
aPoints(0).X = 8 : aPoints(0).Y = 32
aPoints(1).X = 20 : aPoints(1).Y = depth
aPoints(2).X = 30 : aPoints(2).Y = depth
aPoints(3).X = 42 : aPoints(3).Y = 32
g.DrawCurve(Pens.Black, aPoints)
End Function
Any help would be appreciated