Microsoft KB Archive/93329

From BetaArchive Wiki

How to Specify Colors in Microsoft FoxPro for MS-DOS

ID: Q93329

The information in this article applies to:

  • Microsoft FoxPro for MS-DOS, versions 1.0, 1.01, 1.02, 2.0, 2.5, and 2.5a


The following table defines some terms that you will encounter when you are using colors in FoxPro for MS-DOS.

Term           Definition
Color pair     A foreground and background color combination. The
               foreground color specifies the color of the text, and the
               background color specifies the color on which the text is
               displayed. A color pair uses the following format:

                  <foreground color code>/<background color code>

Color scheme   A set of 10 color pairs that are separated by commas.

Color set      A set of 24 color schemes that defines the default colors
               FoxPro uses for an object. You can save a color set to or
               load one from the FOXUSER resource file.

The following tools allow you to change the current color set and modify the FOXUSER.DBF file:

  • Color Picker (choose Color from the Window menu)
  • ProColor (available only in FoxPro 2.0 or later by issuing the DO PROCOLOR.APP command in the Command window)


You can specify any of the following colors in a color pair:

   Color          Code
   -----          ----

   Black          N
   Blank          X
   Blue           B
   Brown          GR
   Cyan           BG
   Gray           W
   Green          G
   Inverse video  I
   Magenta        RB
   Red            R
   Underlined     U
   White          W+
   Yellow         GR+

NOTE: The inverse and underlined colors are not available on a color monitor. The only characters available on a monochrome monitor are black, inverse, underlined, and white. On a monochrome monitor, white may be "W+" or "W." You can create additional colors by adding a "+" or a "*" to the color code.

   Result                     Code

   High Intensity On          +
   Blink On                   *
   Bright Background On       *

The SET BLINK command determines the interpretation of the "*" code. When FoxPro runs in an MS-DOS window in the Microsoft Windows version 3.0 or 3.1 environment and certain fonts are used, the "*" specifies a bright background regardless of the SET BLINK value. The table below lists the FoxPro color schemes and their use.

   Color scheme   FoxPro object

   1              User-defined windows
   2              User-defined menus
   3              System menu bar
   4              System menu popups
   5              System dialogs
   6              System dialog popups
   7              System alerts
   8              System windows
   9              System window popups
   10             Browse windows
   11             Report layout windows
   12             Alert dialog popups
   13 - 16        Reserved for future use
   17 - 24        User-defined schemes


"Developer's Guide," Chapter 14, pages 29-41

Additional reference words: FoxDos 1.00 2.00 2.50 2.50a KBCategory: kbprg KBSubcategory:

Last Reviewed: November 21, 1995
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.