Positioning forms
To position a form under program control, the Placement, Left and Top properties are used. The Placement property is used to specify the new position from a selection of preset values, while Left and Top are used to explicitly specifiy the new position. For example, the following would move the specified form to the center of the screen:
.form.Placement = &.MiddleCenter
For a list of available placement settings see Placement.
When using the Left and Top properties the new position is specified in screen pixels, for example:
.form.Left = 100 .form.Top = 100
To allow the Left and Top properties to be specified in Dialog Box Units (DLUs) the placement property should be set to RelativeToParent.