Description

This event is fired at a drop target control in response to data being dropped into it.

Syntax

bforward = DRAGDROP (ctrlentID, ctrlclassID, DataFormat, DropResult, xDown, yDown, CtrlKey, ShiftKey, AltKey, MouseButton)

Parameters

DRAGDROP accepts arguments for the following parameters.

ParameterDescription
ctrlentIDHas the format WindowNameControlName, where WindowName is the identifier of the window that contains the affected control, and ControlName is the identifier of the control. Notice that a period separates the two values.
ctrlclassIDThe type of control that recognizes the event.
DataFormatContains the name of the dropped data format.
DropResultContains the desired drop action - MOVE or COPY.
xDownx coordinate where the data was dropped (relative to the client area)
YDowny coordinate where the data was dropped (relative to the client area)
ctrlkeyTrue (1), if the ctrl key is pressed. False (0), if the ctrl key is not pressed.
shiftkeyTrue (1), if the shift key is pressed. False (0), if the shift key is not pressed.
mousebuttonA "0" indicates that the left or center mouse button was pressed. A "1" indicates that the right button was pressed. A "2" indicates that the middle mouse button was pressed.

Returns

True or false. If false, the program execution returns to the calling procedure. If true, the event processing goes to the next level.

Remarks

If the result of the operation is a MOVE and the drop source is the same control as the drop target then the actual data transfer is usually handled in the Drop Source DRAGEND event rather than in this event.

This event is fired synchronously.

See also

DRAGOVER EventDRAGSTART event

  • No labels