DEACTIVATE WINDOW Command

Deactivates user-defined windows or Visual FoxPro system windows and removes them from the screen, but not from memory.

DEACTIVATE WINDOW WindowName1 [, WindowName2 ...] | ALL

Parameters

  • WindowName1 [, WindowName2 ...]
    Specifies one or more windows to deactivate. You can specify Visual FoxPro system windows such as the Command window or a Browse window.

  • ALL
    Deactivates all active windows.

    To display the main FoxPro window again, choose Visual FoxPro Screen from the Window menu or issue ACTIVATE WINDOW SCREEN or SHOW WINDOW SCREEN.

Remarks

More than one user-defined window can be placed in the main Visual FoxPro window at the same time, but output is directed only to the most recently activated user-defined window. When more than one user-defined window is present, deactivating the current user-defined output window clears the contents of the window, removes the window from the screen and sends subsequent output to the previously activated user-defined window. If there is no output window, output is directed to the main Visual FoxPro window.

Use CLEAR WINDOWS or RELEASE WINDOWS to remove windows from both the screen and memory.

To deactivate a system window and or a toolbar (in Visual FoxPro), enclose the entire system window or toolbar name in quotation marks. For example, to deactivate the Report Controls toolbar in Visual FoxPro, issue the following command:

DEACTIVATE WINDOW "Report Controls"

Example

In the following example, a window named wOutput1 is defined and activated. After a record from the customer table is displayed, the program waits for the user to press a key and then deactivates the window.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer  && Opens Customer table

CLEAR
DEFINE WINDOW wOutput1 FROM 2,1 TO 13,75 TITLE 'Output' ;
   CLOSE FLOAT GROW ZOOM
ACTIVATE WINDOW wOutput1

DISPLAY
WAIT WINDOW 'Press a key to deactivate the window'
DEACTIVATE WINDOW wOutput1
RELEASE WINDOW wOutput1

See Also

ACTIVATE WINDOW | CLEAR WINDOWS | DEFINE WINDOW | HIDE WINDOW | RELEASE WINDOWS | SHOW WINDOW