WExist(), WMaximum(), WMinimum(), WRead(), WVisible()
The windows of my soul I throw
Wide open to the sun.
John Greenleaf Whittier, My Psalm
These functions tell you about the current status of a window. All accept a parameter specifying the window; pass the name (not the title—see WTITLE()) of the window. For some, the window parameter is optional. Those functions return information about the active window if no window is specified.These functions return information about user-defined windows, system windows and toolbars. With forms, the WindowState and Visible properties provide much of the same information, while MaxButton and MinButton let you find out if a form can be maximized or minimized.
Usage |
lWindowExists = WEXIST( cWindow ) |
Example |
* first, a user-defined window CLEAR ALL ? WEXIST("test") && Returns .F. DEFINE WINDOW test FROM 0,0 TO 10,10 ? WEXIST("test") && Returns .T. * now a system window CLEAR ALL ? WEXIST("Trace") && Returns .F. ACTIVATE WINDOW Trace ? WEXIST("Trace") && Returns .T. HIDE WINDOW Trace ? WEXIST("Trace") && Returns .T. RELEASE WINDOW Trace ? WEXIST("Trace") && Returns .F. |
Usage |
lIsMaximized = WMAXIMUM( [ cWindow ] ) lIsMinimized = WMINIMUM( [ cWindow ] ) |
Example |
DEFINE WINDOW test FROM 0,0 TO 10,40 ZOOM MINIMIZE ACTIVATE WINDOW test ? WMAXIMUM("test") && Returns .F. ? WMINIMUM("test") && Returns .F. ZOOM WINDOW test MAX ? WMAXIMUM("test") && Returns .T. ZOOM WINDOW test MIN ? WMINIMUM("test") && Returns .T. |
Usage |
lInRead = WREAD( [ cWindow ] ) |
Example |
* Before entering the following code in the command window, * open the Debugger and put the string * WREAD("test") * in the Watch window DEFINE WINDOW test FROM 0,0 TO 10,40 ACTIVATE WINDOW test * Note that WREAD("test") is .F. CLEAR @0,0 GET x DEFAULT "abc" READ * Now WREAD("test") is .T. |
Usage |
lIsVisible = WVISIBLE( cWindow ) |
Example |
DEFINE WINDOW test FROM 0,0 TO 10,40 ? WVISIBLE("test") && Returns .F. ACTIVATE WINDOW test ? WVISIBLE("test") && Returns .T. HIDE WINDOW test ? WVISIBLE("test") && Returns .F. SHOW WINDOW test ? WVISIBLE("test") && Returns .T. |
See Also |
Activate Window, Deactivate Window, Define Window, Hide Window, Modify Window, Read, Release Window, Show Window, Visible, WindowState, WTitle(), Zoom Window |