Microsoft Small Basic

Program Listing: HVJ424
a=Controls.AddButton("xxxxxxxxxxxxx",111,111)
Controls.ButtonClicked=OnButtonClicked

state = "LOVE"
Timer.Interval = 250
Timer.Tick = OnTick




Sub OnTick
If (state = "LOVE") Then
state = "HATE"
Else
state = "LOVE"
EndIf
Update()
EndSub

Sub OnButtonClicked
If (state = "LOVE") Then
bob=bob+1

Else
eve=eve+1
EndIf
Update()
EndSub

Sub Update
lastBursh = GraphicsWindow.BrushColor
GraphicsWindow.BrushColor = GraphicsWindow.BackgroundColor
GraphicsWindow.FillRectangle(0,200,1000,1000)
GraphicsWindow.BrushColor = lastBursh
If (state = "LOVE") Then
GraphicsWindow.BrushColor="red"
GraphicsWindow.FontSize=21
GraphicsWindow.DrawText(333,333,"LOVE")
LDSound.Tone(432,50)
Else
GraphicsWindow.BrushColor="black"
GraphicsWindow.FontSize=21
GraphicsWindow.DrawText(433,333,"HATE")
LDSound.Tone(440,50)
EndIf
GraphicsWindow.DrawText(222,222,"gains "+bob+"loses"+eve)
EndSub