delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/12/01:38:21

Date: Fri, 11 Jul 1997 22:36:22 -0700 (PDT)
Message-Id: <199707120536.WAA15671@adit.ap.net>
Mime-Version: 1.0
To: stewilcox AT slicksoft DOT demon DOT co DOT uk
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: console color
Cc: djgpp AT delorie DOT com

You wrote:
>can anyone tell me how i can change the color of the dos screen from
>black to another color ?
Do you mean inside your DJGPP program, or just in general? In the first case:
 textbackground(GREEN); /* or another color constant */
should work. If you mean in general, this is really the wrong place to ask,
but with an ANSI terminal driver (ie ANSI.SYS), you can send the following
string to the CON driver (perhaps with DOS TYPE):
 ESC[XXm
where ESC is the literal ESC character, ASCII 27, and XX is the 0-based
color number + 40.
HTH

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019