Visual Basic Reference

Data Property

See Also    Example    Applies To

Returns or sets a handle to a memory object or graphical device interface (GDI) object containing data in a specified format. Not available at design time.

Syntax

object**.Data** [ **=**number]

The Data property syntax has these parts:

Part Description
Object An object expression that evaluates to an object in the Applies To list.
Number A Long integer specifying the handle.

Remarks

Set this property to send data to an application that created an object. Before using the Data property, set the Format property to specify the type of data contained in the memory object or GDI object.

You can get a list of acceptable formats for an object using the ObjectAcceptFormats and ObjectGetFormats properties.

Setting this property to 0 frees the memory associated with the handle.

Tip   Automation provides an easier and more reliable solution for sending data and commands to and from an object. If an object supports  Automation, you can access the object through the Object property or using the CreateObject and GetObject functions