VSFlexGrid Control > VSFlexGrid Properties, Events, and Methods > VSFlexGrid Events > OLECompleteDrag Event |
Fired after a drop to inform the source component that a drag action was either performed or canceled.
Private Sub VSFlexGrid_OLECompleteDrag(Effect As Long)
The OLECompleteDrag event is the final event to be called in an OLE drag/drop operation. This event informs the source component of the action that was performed when the object was dropped onto the target component. The target sets this value through the effect parameter of the OLEDragDrop event. Based on this information, the source can then determine the appropriate action it needs to take. For example, if the object was moved into the target (vbDropEffectMove), the source should delete the object from itself after the move.
The parameter for the OLECompleteDrag is a long integer set by the target object identifying the action that has been performed, thus allowing the source to take appropriate action if the component was moved (such as the source deleting data if it is moved from one component to another). The possible values are the following:
Constant |
Value |
Description |
vbDropEffectNone |
0 |
Drop operation was cancelled. |
vbDropEffectCopy |
1 |
Drop results in a copy from the source to the Target. The original data remains. |
vbDropEffectMove |
2 |
Drop moves the data from the source to the target. The original data should be deleted. |
For an example of implementing OLE drag and drop with the VSFlexGrid control, see the OLE Drag and Drop Demo.