[comp.sys.ibm.pc] colors under ansi.sys and codeview

jlh@loral.UUCP (The Mad Merkin Hunter) (06/02/88)

I've got 2 unrelated questions dealing with colors.  First off, codeview
seems to have decided on it's own that I want black and white.  It decided
this on it's own, up until a couple of days ago it was in color.  Going
through the manual I see how to make codeview run black and white, but
nada on making it run in color.  Thank you, faceless worker bee in
tech pubs.

Second, I'm using ansi.sys calls to change the background of my screen
display.  When said background is anything but black I have a black border
around my (beautiful) display.  How can I get rid of this border, portability
be damned?  Gee, while I'm at it does anyone have C source for a routine
to let the user change screen colors dynamically?

My system is a True Blue IBM AT with ega, but I want the software to
think I've got cga.


						Thanks.
						Jim

				"Broken spanish spoken perfectly"

-- 
Jim Harkins 
Loral Instrumentation, San Diego
{ucbvax, ittvax!dcdwest, akgua, decvax, ihnp4}!ucsd!sdcc6!loral!jlh

indra@amdcad.UUCP (06/02/88)

In article <1769@loral.UUCP> jlh@loral.UUCP (The Mad Merkin Hunter) writes:
>First off, codeview
>seems to have decided on it's own that I want black and white.  It decided
>this on it's own, up until a couple of days ago it was in color.

You must have run some program that resets the mode. Before invoking 
Codeview, issue: 'mode co80' to reset the display to color 80 columns.
I am not sure what the manual says, but issuing 'mode bw80' before 'cv'
makes CV run in b&w mode.
>						Thanks.
>						Jim
>				"Broken spanish spoken perfectly"
You are welcome,
iNDRA
"Broken Bengali spoken perfectly !!!"


-- 
Indra K. Singhal                      |                                |
{ucbvax,decwrl,allegra}!amdcad!indra  |      This space for rent !     |
amdcad!indra@decwrl.dec.com           |                                |
(408) 749-5445(w)                     |                                | 

jcmorris@mitre-bedford.ARPA (Joseph C. Morris) (06/04/88)

In a recent article jlh@loral.UUCP (The Mad Merkin Hunter) writes:
>                                                                codeview
>seems to have decided on it's own that I want black and white.
>
>          When said background is anything but black I have a black border  
>around my (beautiful) display.

Last things first: the EGA doesn't give you a border on the display...more
properly, it gives you one, but it's always black.

The most likely source of the loss of color support (based on too many
similar experiences) is that you've started running some new program which
doesn't bother to leave the display mode like it found it.  Two recent
examples I've run into are Computer Associates' accounting packages and
MEC's MASS-11 word processing program.  If you've got a way to see what
the current mode setting is (e.g., using Microsoft's WHAT program),
you'll probably find that you are now in mode 2; mode 3 is where you
should be with an EGA.  Try using the MODE  CO80  command and see
if the colors reappear.  (Some programs don't bother to check the mode
before sending color orders to the screen and will display colors even if
the screen claims to be in mode 2...and will succeed.  Others, like
Norton Utilities and apparently Codeview, honor the current screen mode
and don't try to color an apparently B&W screen.)

Good luck.

lowey@damask.UUCP (Kevin Lowey) (06/11/88)

In article <1769@loral.UUCP>, jlh@loral.UUCP (The Mad Merkin Hunter) writes:
> I've got 2 unrelated questions dealing with colors.  First off, codeview
> seems to have decided on it's own that I want black and white.  It decided

  I've noticed a similar thing in Turbo Pascal.  Many programs look at the 
CRT mode (BW or Colour) when they start up, then use grey shades in black and 
white modes, or colours in colour modes.

  Try the command MODE CO80 before running codeview.  This might fix it.
(some MS-DOS versions use CONFIGUR instead of MODE)

> Second, I'm using ansi.sys calls to change the background of my screen
> display.  When said background is anything but black I have a black border
> around my (beautiful) display.  How can I get rid of this border, portability
> be damned?  

  
  Peter Norton's norton utilities has a command called SCRNCOLR (or something
like that) which lets you set the foreground, background, and border colours. 
The border is set with a BIOS call of some kind, but unfortunately I left my 
"Peter Norton's Inside the IBM PC computer" book at home so I can't look up 
the proper BIOS call for you. 

> Gee, while I'm at it does anyone have C source for a routine
> to let the user change screen colors dynamically?

  No source code, but the above utility should work.  Also the book mentioned 
above explains how the screen colours work.  It's not too hard to write your
own routines. (I've done it in Turbo Pascal, but I don't have the source handy)

Hope this helps,
______________________________________________________________________________
| Kevin Lowey                    |The above is the personal opinion of Kevin |
| University of Saskatchewan     |Lowey.  It does not reflect the position of|
| Computing Services             |the University of Saskatchewan in any way. |
| SaskTel: (306) 966-4826        |                                           |
| Bitnet:LOWEY@SASK. (preferred) |I am in no way affiliated with any of the  |
| UUCP:  ihnp4!damask!lowey.uucp |above mentioned companies other than U of S|
|________________________________|___________________________________________|