Results 1 to 3 of 3

Thread: qbasic font background in screen 12?

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    43

    qbasic font background in screen 12?

    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)
    I can help with C++, Java (some), vB, Ruby/RoR, Python, JavaScript, and TorqueScript

  2. #2
    Lively Member
    Join Date
    Dec 2005
    Posts
    68

    Re: qbasic font background in screen 12?

    It's been ages since my QBASIC days, but if I remember correctly, COLOR only accepts 1 parameter.

    Code:
    CLS
    COLOR 12
    PRINT "I'm light red text!"
    COLOR 14
    PRINT "I'm yellow text!"
    So you would have to draw the background, then switch the color, then draw all of your text.

  3. #3
    New Member
    Join Date
    Oct 2006
    Posts
    15

    Re: qbasic font background in screen 12?

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width