Changing the Desktop Color in FoxPro for Windows

ID: Q99543

The information in this article applies to:

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

Last Reviewed: June 27, 1995