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] Flashing CLI when executing program

Author
Message
apocnhorsemen
7
Years of Service
User Offline
Joined: 30th Dec 2015
Location:
Posted: 26th Nov 2021 21:04
Good day to all.

I keep looking for a solution but nothing so far is working, I'm running an example from the Hands On DBPro book in Windows 10 with DBPro Binary 120216 and when running TEXT command the CLI flashes text on-screen. Is there an fix for this or is DBPro incompatible with Win10?


Ink RGB(255,255,0),RGB(255,0,0)
Set Text Opaque
Print "Hello World"
Sync
Wait Key
End

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

Go to answer

Bored of the Rings
17
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 27th Nov 2021 06:33
just add the line :

sync on : sync rate 30: sync

to the top of your program.

works fine on mine and I'm running windows 10.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
apocnhorsemen
7
Years of Service
User Offline
Joined: 30th Dec 2015
Location:
Posted: 27th Nov 2021 15:34
Thank you for the response. I tried that and it did something different. Now the screen is blank, but if I move the CLI around with the mouse I can see what was typed but it blinks while moving. But if I do the following code below it works but of course the Wait Key doesn't work I have to press escape. Not sure what else is going on. I'm on a laptop with extended monitor refresh rate is 60 for both. Could it be a directx issue?

sync on
sync rate 30
do
sync
Ink RGB(255,255,0),RGB(255,0,0)
Set Text Opaque
Print "Hello World"
Wait Key
loop
End
Bored of the Rings
17
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 27th Nov 2021 19:19 Edited at: 27th Nov 2021 19:25
Nope it's not directx , it's your code.

You don't put a wait key in a do loop and sync needs to go before loop.

So it's sync on : sync 30 : sync

Print etc

Sync
Wait key
End

Or

Do

Sync
Loop

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
17
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 27th Nov 2021 19:25 Edited at: 27th Nov 2021 19:29
This post has been marked by the post author as the answer.
so my code:

sync on : sync rate 30 : sync

Ink RGB(255,255,0),RGB(255,0,0)
Set Text Opaque
Print "Hello World"
sync
Wait Key

End



OR

my code using do ... loop

sync on : sync rate 30 : sync

Ink RGB(255,255,0),RGB(255,0,0)
Set Text Opaque
do
cls
Print "Hello World"
sync
loop

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments
apocnhorsemen
7
Years of Service
User Offline
Joined: 30th Dec 2015
Location:
Posted: 27th Nov 2021 19:52
Thank you. I followed the first example and it works as you said. I changed my other tutorial projects to match and they also work. I'll continue with my studies.
Bored of the Rings
17
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 28th Nov 2021 07:53
np, good luck with your studies.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Login to post a reply

Server time is: 2023-02-01 13:44:00
Your offset time is: 2023-02-01 13:44:00