WONTOP( ) Function

Example   See Also

Determines whether the active or specified window is in front of all other windows.

Syntax

WONTOP([WindowName])

Returns

Character or Logical

Arguments

WindowName

Specifies the name of the window WONTOP( ) evaluates. You can specify the name of a user-defined window created with DEFINE WINDOW or a system window (the Command window, the Data Session window, a Browse window, and so on). If you omit WindowName, WONTOP( ) returns the name of the frontmost window. You can also include the empty string in WindowName to specify the main Visual FoxPro window.

If the Debug, Trace, or Command window is frontmost and you don't specify a window name, WONTOP( ) returns the empty string. When you are debugging a program that uses WONTOP( ), program execution isn't affected by bringing these windows forward.

Remarks

WONTOP( ) returns true (.T.) if the specified window is frontmost. It returns false (.F.) if the window isn't frontmost or doesn't exist.