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

Last reviewed: August 13, 1997
Article ID: Q120097
2.60 2.60a | 2.60 2.60a
WINDOWS    | MS-DOS
kbprg kbprb

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.6, 2.6a
  • Microsoft FoxPro for MS-DOS, versions 2.6, 2.6a

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


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: August 13, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.