PRB: Can't Close Browse Window That Has Associated Title

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

SYMPTOMS

Attempting to release a Browse window that is executed as a "BROWSE WINDOW <window name>" command will not work as expected when the window definition referenced in the BROWSE statement has an associated title.

RESOLUTION

To get the Browse window to close, change the ON KEY LABEL command given in the More Informatino section of this article to this:

   ON KEY LABEL ESCAPE RELEASE WINDOW "View Customers"

Then press the ESC to close the Browse window.

STATUS

This behavior is by design.

MORE INFORMATION

The following code demonstrates this behavior. In it, a window definition is set up with a "TITLE" clause. The ON KEY LABEL ESC command attempts to release the defined window by its name, which will fail.

ON KEY LABEL ESCAPE RELEASE WINDOW custview ON KEY LABEL F12 Cancel

CLOSE ALL USE SYS(2004)+"\TUTORIAL\CUSTOMER" IN 1

DEFINE WINDOW custview FROM 0,0 TO 30,66 TITLE "View Customers" NONE FLOAT BROWSE WINDOW custview

The Browse window takes on the attributes of the defined Window for a "Tem- plate" and as such, is not the actual window. Other attributes that the Browse window takes on are the name of the title or, in the absence of a title, the table alias. The Browse window is not an actual window, but an image of the template window.


Additional reference words: FoxWin FoxDos 2.00 2.50 2.50a 2.50b 2.60 2.60a
KBCategory: kbprg kbprb
KBSubcategory: FxprgBrowse


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