Microsoft Small Basic

Program Listing: GQL381
GraphicsWindow.MouseDown = OnMouseDown

gw = GraphicsWindow.Width
gh = GraphicsWindow.Height
size = 100
OnMouseDown()

While ("true")
gw = GraphicsWindow.Width
gh = GraphicsWindow.Height

GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor()
'GraphicsWindow.BrushColor = GraphicsWindow.GetColorFromRGB(124,39,201)
'R = 100+Math.GetRandomNumber(156)
'G = 100+Math.GetRandomNumber(156)
'B = 100+Math.GetRandomNumber(156)
'GraphicsWindow.BrushColor = GraphicsWindow.GetColorFromRGB(R,G,B)
x = Math.GetRandomNumber(gw)
y = Math.GetRandomNumber(gh)
size = Math.GetRandomNumber(5)
'size=5
GraphicsWindow.FillEllipse(x-size/2,y-size/2,size,size)
GraphicsWindow.BrushColor = "black"
'GraphicsWindow.FontName = "Freestyle Script"
GraphicsWindow.FontSize = 90
GraphicsWindow.DrawBoundText(50,50,gw-100,"Fiona is brilliantly brilliant")
'Sound.PlayClickAndWait()
Program.Delay(1)
EndWhile

Sub OnMouseDown
GraphicsWindow.Clear()
GraphicsWindow.BackgroundColor = "black"
EndSub