WLast(), WOnTop(), WOutput()
These three functions tell you about active windows and where output is going. WONTOP() tells you which window is active now. WLAST() tells you which window was active before the one that's active now. WOUTPUT() tells you where output is going now.All three of these functions can either give you the name of the window that has the specified status (last active, currently active, receiving output) or tell you whether a particular window has that status.
Usage |
cReturnValue = WLAST() lReturnValue = WLAST( cWindow ) cReturnValue = WONTOP() lReturnValue = WONTOP( cWindow ) |
Example |
* Open the Watch window * window and put WONTOP() and WLAST() in it * Then, try this: DEFINE WINDOW test1 FROM 0,0 TO 10,30 DEFINE WINDOW test2 FROM 0,40 TO 10,70 ACTIVATE WINDOW test1 * notice that WONTOP() is now "TEST1" * click into the Command window * now WLAST() is "TEST1", too ACTIVATE WINDOW test2 * WONTOP() becomes "TEST2" * Click between the two windows and watch what happens. * Note that clicking on a window doesn't make it WONTOP(). * This isn't true with forms. |
Usage |
cReturnValue = WOUTPUT() lReturnValue = WOUTPUT( cWindow ) |
Example |
* open the Watch window and put WOUTPUT() in it * Then: DEFINE WINDOW test1 FROM 0,0 TO 10,30 DEFINE WINDOW test2 FROM 0,40 TO 10,70 ACTIVATE WINDOW test1 * note that WOUTPUT() is now "TEST1" ACTIVATE WINDOW test2 * WOUTPUT() is now "TEST2" * Click on Debug Window - WOUTPUT() doesn't change * Click between the windows - WOUTPUT() doesn't change |
See Also |
Activate Screen, Activate Window, ActiveForm, Define Window, Hide Window, Show, Show Window, WTitle() |