Wiki Home

Activate Window


Namespace: WIN_COM_API
ACTIVATE WINDOW

There is an undocumented placement clause -- IN MACDESKTOP (versus IN [WINDOW] WindowName3 / IN SCREEN)

A Visual FoxPro WINDOW can be defined, activated, hidden and shown in either the SCREEN or the MACDESKTOP. If the placement clause is not used, the prior window placement definition will be used. If a window placement is not used during the window's lifetime, SCREEN is assumed.

DEFINE WINDOW Test FROM 1, 1 TO 20, 20 TITLE "Test" ZOOM FLOAT CLOSE GROW
ACTIVATE WINDOW Test

DEFINE WINDOW Test FROM 1, 1 TO 20, 20 TITLE "Test" ZOOM FLOAT CLOSE GROW
ACTIVATE WINDOW Test IN MACDESKTOP


Toolbars are windows and can be ACTIVATEd in the MACDESKTOP.

Assume the Standard toolbar is visible on your VFP desktop. If the toolbar is docked on any side, the command ACTIVATE WINDOW "Standard" IN MACDESKTOP will "dock" the window in the same side as your main monitor but you will not be able to drag the toolbar to "undock" it. The DOCK command will not move the toolbar if it is in the MACDESKTOP. ACTIVATE WINDOW "Standard" IN SCREEN brings it back.

If the toolbar is undocked, ACTIVATE WINDOW "Standard" IN MACDESKTOP will allow you to drag the toolbar around your main monitor, but you will never be able to "dock" it.

This actually makes sense.

See Also: Define Window Hide Window Set MacDesktop Show Window
Contributors: Bill Anderson
Category Undocumented VFP Functions
( Topic last updated: 2016.06.21 04:57:13 PM )