OLECompleteDrag Event

Occurs when data is dropped on the drop target or the OLE drag-and-drop operation is canceled.

PROCEDURE Object.OLECompleteDrag
LPARAMETERS nEffect

Property Values

  • nEffect
    A value passed from the OLEDragDrop event, corresponding to the action performed when data is dropped on the drop target. The following table lists the values for nEffect with a description of each action.
    nEffect Foxpro.h constant Description
    0 DROPEFFECT_NONE Drop target did not accept the data or the drop operation was canceled.
    1 DROPEFFECT_COPY Data was copied from the drag source to the drop target.
    2 DROPEFFECT_MOVE Data was moved from the drag source to the drop target.
    4 DROPEFFECT_LINK Data was linked from the drag source to the drop target.

Remarks

OLECompleteDrag is a drag source event, and is the last event to occur during an OLE drag-and-drop operation. Including NODEFAULT prevents a text move from deleting the text.

This event allows the drag source to determine the action performed on the data on the drop target. The drop target can set nEffect in its OLEDragDrop event and the drag source can perform the appropriate action based on the value of nEffect. For example, if the data was moved to the drop target, the drag source should remove the data from itself.

See Also

OLE Drag-and-Drop Overview | OLEDragDrop Event | OLEDropMode Property | NODEFAULT Command

Applies To: CheckBox | ComboBox | CommandButton | CommandGroup | Container Object | Control Object | EditBox | Form | Grid | Image | Label | Line | ListBox | OptionButton | OptionGroup | Page | PageFrame | Shape | Spinner | TextBox | ToolBar