Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / [SOLVED] Text printed to screen flashes

Author
Message
statichash
14
Years of Service
User Offline
Joined: 22nd Sep 2009
Location:
Posted: 19th Jul 2020 03:31
When I use Set Window title "Hello World"
The text that is printed on screen flashes continuously.
I am running Dark Basic Professional - Version 1.071
Any suggestions?

The author of this post has marked a post as an answer.

Go to answer

Seditious
10
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 20th Jul 2020 07:06
Are you using sync on and the sync command?
2002 - Present
Bored of the Rings
User Banned
Posted: 20th Jul 2020 09:32
This post has been marked by the post author as the answer.
top of your code try:

sync on : sync rate 30 ; sync

....

Set Window Title .....

do

sync
loop


change the sync rate 30 if you need to

..
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
statichash
14
Years of Service
User Offline
Joined: 22nd Sep 2009
Location:
Posted: 20th Jul 2020 17:06 Edited at: 20th Jul 2020 17:13
@Board of the Rings thanks for the solution.

Here is the code now with the addition of the wait key in the loop.
No flicker now.

sync on
sync rate 30
sync
Set window on
Set window layout 1,1,1
Set window title "Hello World"
Set window position 100, 200
Set window size 640,480
Set text size 60

do
Print "Hello, World!"
sync
wait key

loop

Login to post a reply

Server time is: 2024-04-25 11:47:09
Your offset time is: 2024-04-25 11:47:09