Reference > TDBNumber Control > TDBNumber Control Events > OLECompleteDrag Event (TDBNumber) |
OLECompleteDrag Event (TDBNumber)
Occurs when a source component is dropped onto a target component, informing the source component that a drag action was either performed or canceled.
control_OLECompleteDrag (Effect As Long)
effect is a long integer set by the source object identifying the action that has been performed, thus allowing the source to take appropriate action if the component was moved.
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, the source can then determine the appropriate action it needs to take. For example, if the object was moved into the target control, the source needs to delete the object from itself after the move.
The possible values of effect are as follows:
0 |
None. Drop target cannot accept the data, or the drop operation was canceled. |
1 |
Copy. Drop results in a copy of data from the source to the target. The original data is unaltered by the drag operation. |
2 |
Move. Drop results in a link to the original data being created between drag source and drop target. |
If OLEDragMode is set to 1-Automatic, then the control handles the default behavior. The event still occurs, however, allowing the user to add to or change the behavior.
See Also