' clickme.bas -- DVX BASIC click test
'
' Demonstrates form loading, control properties, and event handling.
' Load this file in DVX BASIC, then click Run.

DIM clickCount AS INTEGER
clickCount = 0

Load ClickMe
ClickMe.Show

PRINT "Form loaded. Click the button!"

' Event loop -- keeps the program alive for events.
' The IDE yields to DVX between VM slices, so widget
' events fire during DoEvents pauses.
DO
    DoEvents
LOOP

SUB Command1_Click
    clickCount = clickCount + 1
    Text1.Text = "Clicked " + STR$(clickCount) + " times!"
    Label1.Caption = "Keep clicking!"
END SUB

SUB ClickMe_Load
    PRINT "Form_Load fired!"
END SUB
