How To Hide the Command Window in FoxPro

Last reviewed: January 9, 1997
Article ID: Q105003
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a

A programmer using Microsoft FoxPro may find it necessary to hide the Command window from within the executing program in order to restrict the end user from gaining access to core routines, or to the program itself. The Command window may also be hidden in order to make the programmer's menu the only thing visible to the end user.

To hide the Command window:

  1. Define a window to hold the Command window.
2. Activate the Command window inside the small window.

NOTE: Do not activate the small window.

For example:

   DEFINE WINDOW hide FROM 1,1 to 3,3
   ACTIVATE WINDOW command IN hide

Because window "hide" does not get activated, the Command window inside "hide" will not be visible.

NOTE: In FoxPro for MS-DOS, the following command will bring the command window back once it is hidden:

   ON KEY LABEL {key label} ACTIVATE WINDOW COMMAND IN SCREEN

When the key label is selected, the Command window will be activated in the screen.


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a
KBCategory: kbprg
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: January 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.