if I want to add some graphics (such as a fake GUI) into my QBASIC program, with a grey (7) background, how to I make the text not have the default background? (it is black, but when i use "COLOR 0, 7" it says invalid syntax)
Printable View
if I want to add some graphics (such as a fake GUI) into my QBASIC program, with a grey (7) background, how to I make the text not have the default background? (it is black, but when i use "COLOR 0, 7" it says invalid syntax)
It's been ages since my QBASIC days, but if I remember correctly, COLOR only accepts 1 parameter.
So you would have to draw the background, then switch the color, then draw all of your text.Code:CLS
COLOR 12
PRINT "I'm light red text!"
COLOR 14
PRINT "I'm yellow text!"
I was pretty sure I had set background colors before so I checked the help file. (I still need to boot into "real" DOS, or close enough to it, for some things at work.) Screen modes 4, 12, and 13 only let you set the foreground color. Screen modes 7-10 let you set a background color if that helps any.