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 / RGB Question

Author
Message
swayze brasil
17
Years of Service
User Offline
Joined: 3rd Nov 2006
Location: Brazil
Posted: 28th Jun 2009 01:51
Use code:
INK RGB(255,255,0),RGB(0,0,255)
PRINT "YELLOW IN BLUE"
WAIT KEY

The monitor prints "YELLOW IN BLUE" in yellow as it os supposed to do but the Background is not in blue as it is supposed to be but it I write CLS RGB(0,0,255) after Wait Key and after pressing a key, the screen clears and is blue then.

Complate code:

Set Display Mode 1064,768,32

Ink RGB(255,255,0),RGB(0,0,255)
PRINT "YELLOW IN BLUE"
Wait Key

CLS RGB(0,0,255)
WAIT KEY

Can someone please tell me what is wrong?

Thank You

Ken
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 28th Jun 2009 05:27
The background color is rarely used. If you use the command SET TEXT OPAQUE before the print command, the background color will be used behind the text.



Diggsey: I have a spine and memory, but one memorable guy says he hates me. What am I?
zaxer thawl
16
Years of Service
User Offline
Joined: 29th Jan 2008
Location: Fredericksburg Texas
Posted: 3rd Jul 2009 01:57
here, try this code:


there may be a context mistake, i havn't tested it, but i'm sure it works.
i think the reason your original code didnt work is because in the INK command, the background color isn't really the Backdrop color. tell me if i'm wrong, i'll whack myself for you.
im not in darkbasic at the moment, so thats why this is not tested.

Coreldraw Graphics suite X3 >>>>> Yes
Darkbasic pro >>>>> Yes
zaxer thawl
16
Years of Service
User Offline
Joined: 29th Jan 2008
Location: Fredericksburg Texas
Posted: 3rd Jul 2009 02:11
WAIT, dont kill me yet if that didnt work, i forgot to add the Backdrop on command. that goes before the color backdrop rgb command, and it may even fix your first code if you put it before your ink command. its only been a few minutes, and im still not at the computer with dbpro to test. and i cant remember if adding this command helps or not(as it may already be turned on by the Color backdrop command)but i posted jest to be safe.

Coreldraw Graphics suite X3 >>>>> Yes
Darkbasic pro >>>>> Yes

Login to post a reply

Server time is: 2024-09-28 08:21:13
Your offset time is: 2024-09-28 08:21:13