OLESetData
This event is part of the set of PEMs that gives you total control over what actually gets dropped during OLE drag and drop. It lets you determine the data dropped, at the very last minute, just as it's needed.
Usage |
PROCEDURE oObject.OLESetData LPARAMETERS oDataObject, uFormat |
Parameter |
Value |
Meaning |
oDataObject |
Object |
An object reference to the data being dragged and information about it. |
uFormat |
Numeric or Character |
The data format requested by the drop target. |
In VFP 6, Help says that OLESetData fires when there's no data in the appropriate format. In VFP 7, it also says that OLESetData fires when GetData is executed. Neither statement is completely correct. OLESetData fires whenever it contains code. We're hoping this one is a documentation bug, not a product bug, because we really like the idea of deciding what to drop at the very last minute. |
Example |
* The example for OLEStartDrag shows how to create * a custom format and add to it. In that example, * the data is added in OLEStartDrag. But, that line * could instead occur in OLESetData: oDataObject.SetData(This.Picture,"Picture") |
See Also |
DataObject, GetData, GetFormat, OLE drag and drop, OLEDragDrop, SetData |