' TwoWindows.bas
NOMAINWIN
GRAPHICBOX #Main.GBx1,0,0,1920,1080
STYLEBITS #Main.GBx1,0,_WS_BORDER,0,0
GRAPHICBOX #Side.GBx1,0,0,200,1080
STYLEBITS #Side.GBx1,0,_WS_BORDER,0,0
[MAIN]
WindowWidth = 1920
WindowHeight = 1080
LOADBMP "Back", DefaultDir$ + "\" + "BACK.bmp" '1920x1080 bmp file
OPEN "BACK" FOR window_popup AS #Main
#Main "TRAPCLOSE [QuitMain]"
#Main.GBx1 "down"
#Main.GBx1 "drawbmp Back 0 0"
#Main.GBx1 "when leftButtonDown [MouseLeftButton]"
#Main.GBx1 "when mouseMove [MouseMove]"
WAIT
[QuitMain]
CLOSE #Main
END
[SIDE]
UpperLeftX = 1720
UpperLeftY = 0
WindowWidth = 200
WindowHeight = 1080
LOADBMP "Side", DefaultDir$ + "\" + "SIDE.bmp" '200x1080 bmp file
OPEN "SIDE" FOR window_popup AS #Side
#Side "TRAPCLOSE [QuitSide]"
#Side.GBx1 "down"
#Side.GBx1 "drawbmp Side 0 0"
WAIT
[QuitSide]
CLOSE #Side
WAIT
[MouseLeftButton]
IF (MouseX < 10 AND MouseY < 10) THEN GOTO [QuitMain] 'clic on top left = QUIT
WAIT
[MouseMove]
IF MouseX > 1900 THEN GOTO [SIDE] 'open "SIDE"
IF MouseX < 1720 THEN GOTO [QuitSide] 'close "SIDE"
WAIT
' TwoWindows.bas
NOMAINWIN
GRAPHICBOX #Main.GBx1,0,0,DisplayWidth,DisplayHeight
STYLEBITS #Main.GBx1,0,_WS_BORDER,0,0
GRAPHICBOX #Side.GBx1,0,0,200,DisplayHeight
STYLEBITS #Side.GBx1,0,_WS_BORDER,0,0
[MAIN]
WindowWidth = DisplayWidth
WindowHeight = DisplayHeight
' LOADBMP "Back", DefaultDir$ + "\" + "BACK.bmp" 'DisplayWidthxDisplayHeight bmp file
OPEN "BACK" FOR window_popup AS #Main
#Main "TRAPCLOSE [QuitMain]"
#Main.GBx1 "down"
#Main.GBx1 "drawbmp Back 0 0"
#Main.GBx1 "when leftButtonDown [MouseLeftButton]"
#Main.GBx1 "when mouseMove [MouseMove]"
UpperLeftX = DisplayWidth-200
UpperLeftY = 0
WindowWidth = 200
WindowHeight = DisplayHeight
'LOADBMP "Side", DefaultDir$ + "\" + "SIDE.bmp" '200xDisplayHeight bmp file
STYLEBITS #Side,0,_WS_VISIBLE,0,0
OPEN "SIDE" FOR window_popup AS #Side
#Side.GBx1 "down; fill red"
#Side.GBx1 "drawbmp Side 0 0"
WAIT
[QuitMain]
CLOSE #Main
CLOSE #Side
END
[MouseLeftButton]
IF (MouseX < 10 AND MouseY < 10) THEN GOTO [QuitMain] 'clic on top left = QUIT
WAIT
[MouseMove]
IF MouseX > DisplayWidth-20 THEN #Side "show"
IF MouseX < DisplayWidth-200 THEN #Side "hide"
WAIT