Partilhar via


Align Property

Specifies the alignment of an ActiveX™ control (.ocx) on a form. Available at design time and run time.

OLEContainerControl.Align[ = nAlign]

Property Values

  • nAlign
    The settings for the Align property are:
    Setting Description
    0 Standard alignment. The ActiveX control is placed in the same position as the OLE Container control on the form.
    1 Top. The ActiveX control is placed at the top of the form.
    2 Bottom. The ActiveX control is placed at the bottom of the form.
    3 Left. The ActiveX control is placed at the left edge of the form.
    4 Right. The ActiveX control is placed at the right edge of the form.

Remarks

An ActiveX control (.ocx file) is placed in OLE Container control.

The Align property is only available for ActiveX controls that support changes to their alignment. Insertable OLE objects such as Microsoft Excel worksheets do not support the Align property.

The Align property is available only for ActiveX controls that are placed on a form.

If two or more ActiveX controls have the same Align property setting, the controls are stacked on top of each other.

See Also

OLE Container Control | ActiveX Controls Overview | Alignment Property | Adding OLE Objects to Your Applications

Applies To: OLE Container Control