Available in the LEADTOOLS Imaging toolkit. |
Drag and Drop
LEADTOOLS provides properties and events that support the drag and drop process in the Main control. The properties and events of the Main control let you drag an image that is open in one Main control and drop it in another Main control.
To begin the drag and drop process, you must enable the process by setting the EnableOLEDragMethod property (Main Control) to TRUE.
With the drag and drop process enabled, press the left mouse button within the Main control and begin dragging. This will generate the OLEStartDrag event (Main Control).
As you continue to drag the image, two more events are generated repeatedly for the control.The OLEDragOver event (Main Control) and the OLEGiveFeedback event (Main Control) are generated. The OLEDragOver event receives information concerning the button(s) used in the dragging process and the location of the cursor during the dragging process. The OLEGiveFeedback event receives a parameter that is used to indicate which cursor to use during the dragging process. By setting the parameter received by the OLEGiveFeedback event to FALSE, a custom cursor can be displayed during the dragging process. The custom cursor that will be used in this case is set in the OLEDragCursor property (Main Control).
When the dragging process is finished and you drop the image into the target control, an OLECompleteDrag event (Main Control) is generated.