Visual Basic Reference
See Also Example Applies To
Occurs on an source component when a target component performs the GetData method on the sources DataObject object, but the data for the specified format has not yet been loaded.
Private Sub object_OLESetData(data As DataObject, dataformat As Integer)
The OLESetData event syntax has these parts:
|object||An object expression that evaluates to an object in the Applies To list.|
|data||A DataObject object in which to place the requested data. The component calls the SetData method to load the requested format.|
|dataformat||An integer specifying the format of the data that the target component is requesting. The source component uses this value to determine what to load into the DataObject object.|
In certain cases, you may wish to defer loading data into the DataObject object of a source component to save time, especially if the source component supports many formats. This event allows the source to respond to only one request for a given format of data. When this event is called, the source should check the format parameter to determine what needs to be loaded and then perform the SetData method on the DataObject object to load the data which is then passed back to the target component.