OLESetData Event

Applies To   See Also

Occurs on a drag source when a drop target calls the GetData method and there is no data in a specified format in the OLE drag-and-drop DataObject.

Syntax

PROCEDURE Object.OLESetData
LPARAMETERS oDataObject, eFormat

Settings

oDataObject

An object reference to OLE drag-and-drop DataObject, used with the SetData method to place data in the DataObject.

eFormat

A numeric or character value that indicates the format of the data the GetData method requests. The drag source uses this value to determine the format of the data to place in the DataObject. See the GetData method for a table that lists the numeric or character values for each data format and a description of each format.

Remarks

OLESetData is a drag source event. Including NODEFAULT has no effect on the behavior of this method.

The OLESetData event occurs when the GetData method is executed and there is no data in the DataObject in the format specified in the GetData method. Within the OLESetData event you can place data in the DataObject in the specified format with the SetData method. This technique is called "delay rendering" and allows you to put data on the DataObject only when it is requested.