Post by gaslouk on Jan 17, 2023 2:14:22 GMT -5
Hello.
In my attempt to include a library in a program I discovered that the include command does not work.
The last one is the exit.inc file
In my attempt to include a library in a program I discovered that the include command does not work.
What am I doing wrong;
'bitmap.bas
'demonstrate the bitmap command for bmpbuttons
WindowWidth = 248
WindowHeight = 175
nomainwin
loadbmp "arrow", "C:\Users\loyka\AppData\Roaming\Liberty BASIC v4.5.1\bmp\arrwbttn.bmp"
loadbmp "blue", "C:\Users\loyka\AppData\Roaming\Liberty BASIC v4.5.1\bmp\bluebttn.bmp"
bmpbutton #main.button1, "C:\Users\loyka\AppData\Roaming\Liberty BASIC v4.5.1\bmp\blank4.bmp", [button1Click], UL, 22, 11
bmpbutton #main.button2, "C:\Users\loyka\AppData\Roaming\Liberty BASIC v4.5.1\bmp\blank4.bmp", [button2Click], UL, 22, 46
open "untitled" for graphics as #main
print #main, "trapclose [exit]"
print #main, "down ; fill white; flush"
[main.inputLoop]
'wait here for input events
wait
[button1Click] 'Perform action for the button named 'button1'
print #main.button2, "setfocus"
print #main.button2, "bitmap arrow"
print #main.button1, "bitmap blue"
goto [main.inputLoop]
[button2Click] 'Perform action for the button named 'button2'
print #main.button1, "setfocus"
print #main.button1, "bitmap arrow"
print #main.button2, "bitmap blue"
goto [main.inputLoop]
'include C:\Users\loyka\AppData\Roaming\Liberty BASIC v4.5.1\inc\exit.inc
[exit]
flags = _MB_ICONQUESTION OR _MB_YESNO
calldll #user32, "MessageBoxA", _
0 as long, _
"Είστε σίγουρος/η οτί θέλετε να τερματίσετε την εφαρμογή Λογιστήριο;" as ptr, _
"Exit" as ptr, _
flags as long, _
Result as long
'Result returns : 1=ok 2=cancel 3=abort 4=retry 5=ignore 6=yes 7=no
if Result = 6 then
close #main : END
end if
if Result = 7 then
goto [main.inputLoop]
end if
The last one is the exit.inc file
thens
Gaslouk.