Docking Forms

You can dock forms the same way you can dock toolbars. However, unlike docked toolbars, docked forms resize to fill the dock area of the item they are docked with, but only affected dimensions are changed. For example, if you dock a form to the right edge of the target object, the width of the form does not change.

You can link-dock or tab-dock user-defined forms inside Visual FoxPro IDE windows. A form is link-docked to another form when they share a container. A form is tab-docked to another form when they display tabs that you can click to display each form. While the form is docked, controls on the form can still receive focus. When a form is docked along the border of the main Visual FoxPro window, its title bar is displayed at half its height.

Note

Unlike Visual FoxPro windows, Visual FoxPro does not save the dock settings when closing a user-defined form. You need to provide code for handling this task.

When docking a form, Visual FoxPro calls the form's Resize event. For more information, see Resize Event.

When a form's Visible property is set to .F. (False), Visual FoxPro automatically undocks the form and hides it. When the form's Visible property is set to .T. (True), Visual FoxPro attempts to dock the form in the original location if possible. For more information, see Visible Property.

You can use the following functions, properties, methods, and events to retrieve the form's dock state or write code for docking events:

See Also

Tasks

How to: Dock Forms
How to: Dock Toolbars
How to: Set Properties at Run Time

Other Resources

Working with Forms
Creating Forms
Customizing Forms