PRB: SET COLOR Not Working in Format (.FMT) File Run in 2.6

ID: Q120097

2.60 2.60a | 2.60 2.60a

WINDOWS    | MS-DOS
kbprg kbprb

The information in this article applies to:

SYMPTOMS

When the SET COLOR command is used in an format file, FoxPro 2.6 will not run the format file correctly. A format file that has been built in FoxBASE+ or dBASE can include the SET COLOR command to change colors of parts (@ ... GET statements) of the screen. If the SET COLOR command is used between GET statements in the format file, FoxPro 2.6 for Windows and MS-DOS reads the SET COLOR command, then clears the screen and shows the next GET.

WORKAROUND

If the COLOR clause is used on each GET, the format screen will act as expected. It will also work as expected if a READ command is put in the format file and the format file is run with the DO command instead of the SET FORMAT TO <filename> command.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

1. Type the following code in a text file called TEST.FMT. Make sure the

   file has an .FMT extension.

      SET COLOR TO ,R+/N
      @ 10,10 GET abc DEFAULT SPACE(5)
      SET COLOR TO ,B+/N
      @ 11,10 GET xyz DEFAULT SPACE(9)

2. In the Command window, issue the following commands:

      SET FORMAT TO test.fmt
      READ

The first GET comes up on the screen, and, after you press the ENTER key to execute the READ command, the screen clears and the second GET comes up. The two GETs should come up together on the screen with each one having its own text color. This is the behavior in FoxPro 2.5x.

Additional reference words: FoxWin FoxDos 2.60 2.60a KBCategory: kbprg kbprb KBSubcategory: FxprgGeneral

Last Reviewed: August 13, 1997