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.

Newcomers DBPro Corner / White on black but not black on white? :S

Author
Message
I Am Herenow
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location:
Posted: 20th Jan 2007 19:01
For some reason in my program, the line

"INK RGB (255,255,255), RGB (0,0,0)"

works fine, but

"INK RGB (0,0,0), RGB (255,255,255)"

doesn't! The second one just gives me a black screen! Please help! :S
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Jan 2007 19:20
The second parameter doesn't actually change the background color. What it does is change the text background color if the text is set to opaque.

To change the background color, use CLS.

I Am Herenow
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location:
Posted: 21st Jan 2007 11:25
"INK RGB (0,0,0), RGB (255,255,255)
CLS"

Still doesn't work! What's the exact syntax? :S
FROGGIE!
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: in front of my computer
Posted: 21st Jan 2007 14:03 Edited at: 21st Jan 2007 14:03
CLS RGB(255,255,255)

(Ignore this. it wont let me post without lower csae letters)
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 22nd Jan 2007 01:22
As an additional tip, you don't need to use:

Ink RGB(255,255,255),RGB(0,0,0)

Instead, you can use:

Ink RGB(255,255,255),0

RGB is a calculation function and in this case, one where the result is always 0 so you can same time (albeit a miniscule amount) by not doing the calculation at all.

TDK_Man

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 22nd Jan 2007 02:55
It's just as Zotoaster says. You need to set the text to opaque before the background part will work in the ink command.



I Am Herenow
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location:
Posted: 22nd Jan 2007 21:58
Thanks guys, it works now!

Actually, turns out it wasn't working because my CLS and INK commands were inside a FOR...NEXT loop, so it kept clearing the text before displaying it (silly me! )

Login to post a reply

Server time is: 2024-09-25 17:20:36
Your offset time is: 2024-09-25 17:20:36