Export (0) Print
Expand All
D
Expand Minimize

Visual Basic Reference

Visual Studio 6.0

DisplayType Property

See Also    Example    Applies To

Returns or sets a value indicating whether an object displays its contents or an icon.

Syntax

object.DisplayType [ = value]

The DisplayType property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value An integer or constant specifying whether an object displays its contents or an icon, as described in Settings.

Settings

The settings for value are:

Constant Value Description
vbOLEDisplayContent 0 (Default) Content. When the OLE container control contains an object, the object's data is displayed in the control.
vbOLEDisplayIcon 1 Icon. When the OLE container control contains an object, the object's icon is displayed in the control.

Remarks

This property determines the default setting of the Display As Icon check box in the Insert Object and Paste Special dialog boxes. When you display these dialog boxes either at run time (with the InsertObjDlg or PasteSpecialDlg methods) or design time, the Display As Icon check box is automatically selected if this property is set to 1 (Icon).

When creating an object at run time using the CreateEmbed or CreateLink methods, use the DisplayType property to determine if the object is displayed as an icon (set DisplayType = 1) or if the object's data is displayed in the control (set DisplayType = 0).

Once you create an object, you can't change its display type.

Show:
© 2015 Microsoft