Global program flow

1) Initialize the Visio library
2) Create the main window
3) Create the grid
4) Create your widgets
5) Show main window
6) Enter the main loop of the program


Demo program: "Hello World" application

REM *** Step 1)
IMPORT visio.bas
visio::init()

REM *** Step 2)
win = visio::window("Hello World", 100, 100, V_POS_CENTER)

REM *** Step 3)
grid = visio::grid(win, 20, 20)

REM *** Step 4)
label = visio::label(grid, 1, 1, 18, 5, "Hello World!")
button = visio::button(grid, 5, 10, 10, 8, "Exit")

REM *** Step 5)
visio::show(win)

REM *** Step 6)
REPEAT
    visio::wait(V_TRUE)
UNTIL visio::button_clicked(button)
visio::exit()
END