Determines whether output is being directed to the active or specified window.
WOUTPUT([WindowName]) |
Parameters
- WindowName
- Specifies the window WOUTPUT(В ) evaluates for output. Output cannot be directed to a system window or toolbar. If you omit WindowName, WOUTPUT(В ) returns the name of the window to which output is currently directed. You can also include the empty string in WindowName to specify the main Visual FoxPro window. WOUTPUT(В ) returns the empty string if output is being directed to the main Visual FoxPro window.
Return Value
Logical and Character
Remarks
WOUTPUT(В ) returns true (.T.) if the specified user-defined window is the active output window. WOUTPUT(В ) returns false (.F.) if the window you specify doesn't exist or is a system window. The last user-defined window activated with ACTIVATE WINDOW is the active output window.
Example
In the following example, a window is created and activated. WOUTPUT(В ) is used to display the name of this active output window. The window is closed and removed from memory. If another window is active, its name is displayed. If another window isn't active, a message is displayed indicating that output is directed to the main Visual FoxPro window.
В | Copy Code |
---|---|
DEFINE WINDOW wOutput1 FROM 2,2 TO 12,32 TITLE 'Output Window' ACTIVATE WINDOW wOutput1 WAIT WINDOW 'wOutput1 window: ' + WOUTPUT( ) RELEASE WINDOW wOutput1 IF EMPTY(WOUTPUT( )) WAIT WINDOW 'Output being directed to the main Visual FoxPro window' ELSE WAIT WINDOW 'Output window: ' + WOUTPUT( ) ENDIF |