Microsoft Small Basic

Program Listing: PRZ048
'Set graphics window size and other defaults
GraphicsWindow.Width = 600
GraphicsWindow.Height = 500
GraphicsWindow.FontSize = 20
Turtle.Speed = 10

'Set brush color and write a message
GraphicsWindow.BrushColor = "Blue"
GraphicsWindow.DrawBoundText(50, 20, 600, "Thank you for reading the Global Developer Blog!")

'Set pen color and draw a simple design with the Turtle object
GraphicsWindow.PenColor = "Blue"
For i = 1 To 4
For j = 1 To 360 Step 8
Turtle.Move(8)
Turtle.Turn(8)
EndFor
Turtle.Turn(90)
EndFor

'Set brush color and write a message
GraphicsWindow.Clear()

GraphicsWindow.BrushColor = "Red"
GraphicsWindow.DrawBoundText(50, 20, 600, "Thank you for reading the Global Developer Blog!")

''Set pen color and draw a second design with the Turtle object
GraphicsWindow.PenColor = "Red"
For i = 1 To 200 Step 2
Turtle.Move(i/2)
Turtle.PenUp()
Turtle.Move(i/4)
Turtle.PenDown()
Turtle.Turn(45)
EndFor