PRB: Output Sent to Screen Won't Overwrite Window in FoxPro

Last reviewed: June 28, 1995
Article ID: Q116306
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, 2.5b, 2.6
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6

SYMPTOMS

Output that is directed to the screen and is underneath an active window is not visible. This behavior may occur when you are executing a program that was created for dBASE IV.

CAUSE

In FoxPro, a window is opaque. Output directed to a location on the screen that is underneath a window will therefore not be visible until the window is moved, released, or hidden. In dBASE IV, a window has certain transparent attributes. Therefore, output directed to a location on the screen that is underneath a window may actually appear inside the window. This behavioral difference cannot be avoided with the SET COMPATIBLE command.

RESOLUTION

If you need to place text in a window, use the DEFINE WINDOW command to create a window and then draw text directly in that window. If you need to place text on the screen so that it appears to be inside a window, use the @ ... TO command to create a border that simulates the border of a window.

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 Problem

The following code can be used to reproduce the behavioral differences explained in this article:

     DEFINE WINDOW test FROM 10,10 TO 20,40
     ACTIVATE WINDOW test
     ACTIVATE SCREEN
     @ 15,20 SAY "Overwrite"
     i = INKEY(0)
     RELEASE WINDOW test

When this code is executed in dBASE IV, the word "Overwrite" will appear inside the window. When this code is executed in FoxPro, the word "Overwrite" will appear underneath the window and will not become visible until the window is released.


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b 2.60
KBCategory: kbdisplay kbprint kbprg kb3rdparty kbprb
KBSubcategory: FxinteropDbase


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 28, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.