Objective:
Change the titlebar of the main window with TITLEBAR command.
Requirement:
Liberty BASIC (i use Liberty BASIC v4.03).
Let's Coding:
TITLEBAR is a command in Liberty BASIC to change the titlebar of the main window. Note that TITLEBAR works only for main window. It is doesn't change the title of any other window type, like Window, Graphics, or Dialog. We should put WAIT command after it. If not, it doesn't works.
Please run this code. Is this works?
[COLOR=Blue]titlebar[/COLOR] [COLOR=Green]"Hello, CodeCall !"[/COLOR]
Now, put WAIT command like this.
[COLOR=Blue]titlebar[/COLOR] [COLOR=Green]"Hello, CodeCall !"[/COLOR]
[COLOR=Blue]wait[/COLOR]
Mini Quiz:Please, make a program so at titlebar of the mainwindow will show us counting down from 5 up to 1 every one second. After that, the program must print "Good Job !!!" in the main window.
Answer.
[COLOR=Blue]timer[/COLOR] [COLOR=DarkOrange]1000[/COLOR], [display]
[COLOR=Blue]wait[/COLOR]
[display]
[COLOR=Blue]read[/COLOR] [COLOR=Teal]number$[/COLOR]:[COLOR=Blue]titlebar[/COLOR] [COLOR=Teal]number$[/COLOR]
[COLOR=Blue]if[/COLOR] [COLOR=Teal]number$[/COLOR]=" " [COLOR=Blue]then[/COLOR] [COLOR=Blue]timer[/COLOR] [COLOR=DarkOrange]0[/COLOR]:[COLOR=Blue]print[/COLOR] [COLOR=Green]"Good Job !!!"[/COLOR]:[COLOR=Blue]end[/COLOR]
[COLOR=Blue]wait[/COLOR]
[COLOR=Blue]data[/COLOR] [COLOR=Green]"5"[/COLOR],[COLOR=Green]"4"[/COLOR],[COLOR=Green]"3"[/COLOR],[COLOR=Green]"2"[/COLOR],[COLOR=Green]"1"[/COLOR],[COLOR=Green]" "[/COLOR]


Sign In
Create Account


Back to top









