Changing the Desktop Color in FoxPro for Windows

Last reviewed: June 27, 1995
Article ID: Q99543
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SUMMARY

The following information describes two different methods of changing the colors of the FoxPro for Windows desktop without using the Control Panel to change the entire Windows environment.

MORE INFORMATION

The first method is to be used in a program, and the second method is to be used upon startup of FoxPro.

NOTE: The second method offers the advantage of providing a convenient location to initialize global variables and setting the environment, such as SET CLOCK STATUS or =AFONT(ra_font), without showing this as history information in the Command window. Additionally, the initial environment can be restored easily (if needed) by DOing SETUP.PRG again.

In either case, the color of the Main window in FoxPro is not refreshed until the following commands are issued:

   ACTIVATE WINDOW SCREEN
      CLEAR

Method 1

Enter the following command in your code

   MODIFY WINDOW SCREEN COLOR <foreground/background>

where <foreground/background> may be either Xbase color pair types such as W+/BG, or Windows-style statements, such as RGB(255,255,255,0,128,128).

Method 2

  1. Create or modify the CONFIG.FPW file, and add the following line to it:

    COMMAND=DO SETUP

  2. Create a SETUP.PRG program file, containing the following line

    SET COLOR OF SCHEME 1 TO <foreground/background>

    where <foreground/background> is either one of the types as mentioned above in the first method.


Additional reference words: FoxWin 2.50 2.50a
KBCategory: kbsetup kbenv
KBSubcategory: FxenvConfigfp


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.