ShowWindow
This property, added in VFP 5, determines who owns a form or toolbar. Together with the Desktop property, it also determines where the form or toolbar appears.
Usage |
nWindowOwner = oObject.ShowWindow |
Parameter |
Value |
Meaning |
nWindowOwner |
0 |
The main VFP window (_SCREEN) owns the form or toolbar. |
1 |
A VFP-created top-level form owns the form or toolbar. |
|
2 |
Windows owns the form—it's a top-level form. |
If you create a toolbar as a child of a top-level form too early in the form's existence, the toolbar is confined to the main VFP window rather than to the top-level form. Load and Init are definitely too early. Activate is late enough—just remember to add some code so you create the toolbar only once. |
Example |
IF This.ShowWindow = 2 This.Caption = "You don't own me!" ENDIF |
See Also |
AlwaysOnBottom, AlwaysOnTop, Desktop, MDIForm, _Screen, ShowInTaskBar, WindowType |