' Image Launcher short
NOMAINWIN
WindowWidth = 1920
WindowHeight = 1080
LOADBMP "BackgroundImage",".\Aucune.bmp"
GRAPHICBOX #MainWindow.GBx1,0,0,1920,1080
STYLEBITS #MainWindow.GBx1,0,_WS_BORDER,0,0
[MAIN]
OPEN "Display BMP image" FOR window_popup AS #MainWindow
#MainWindow "TRAPCLOSE [QUIT_MAIN_WINDOW]"
#MainWindow.GBx1 "down"
#MainWindow.GBx1 "drawbmp BackgroundImage 0 0"
#MainWindow.GBx1 "when leftButtonDown [MouseLeftButton]"
WAIT
[MAIN_REFRESH]
'***
LOADBMP "BackgroundImage",ImageFile$
'***
#MainWindow.GBx1 "down"
#MainWindow.GBx1 "drawbmp BackgroundImage 0 0"
WAIT
[QUIT_MAIN_WINDOW]
CLOSE #MainWindow
END
[MouseLeftButton]
IF (MouseX > 1685 AND MouseX < 1770) THEN 'Aucune
IF (MouseY > 1055 AND MouseY < 1069) THEN
UNLOADBMP "BackgroundImage"
'****
'LOADBMP "BackgroundImage",".\Aucune.bmp"
ImageFile$ = ".\Aucune.bmp"
'****
GOTO [MAIN_REFRESH]
END IF
END IF
IF (MouseX > 603 AND MouseX < 671) THEN 'Bachata
IF (MouseY > 962 AND MouseY < 979) THEN
UNLOADBMP "BackgroundImage"
'****
'LOADBMP "BackgroundImage",".\Bachata.bmp"
ImageFile$ = ".\Bachata.bmp"
'****
GOTO [MAIN_REFRESH]
END IF
END IF
IF (MouseX > 207 AND MouseX < 315) THEN 'Cha-Cha-Cha
IF (MouseY > 919 AND MouseY < 935) THEN
UNLOADBMP "BackgroundImage"
'****
'LOADBMP "BackgroundImage",".\Cha-Cha-Cha.bmp"
ImageFile$ = ".\Cha-Cha-Cha.bmp"
'****
GOTO [MAIN_REFRESH]
END IF
END IF
IF (MouseX > 1820 AND MouseY > 1045) THEN GOTO [QUIT_MAIN_WINDOW] ' "Quitter"
WAIT
...
[MAIN_REFRESH]
UNLOADBMP "BackgroundImage"
LOADBMP ".\" + ImageFile$ + ".bmp"
#MainWindow.GBx1 "down"
#MainWindow.GBx1 "drawbmp BackgroundImage 0 0"
WAIT
...
[MouseLeftButton]
IF (MouseX > 1685 AND MouseX < 1770) THEN 'Aucune
IF (MouseY > 1055 AND MouseY < 1069) THEN
ImageFile$ = "Aucune"
GOTO [MAIN_REFRESH]
END IF
END IF