From Xojo Documentation


RectControl.DropObject(Obj as DragItem, Action as Integer)

Supported for all project types and targets.

The item represented by Obj has been dropped on the control.


The Obj parameter is the object being dragged. The Action parameter specifies the drag action. It can take the following class constants of the DragItem class:

Value Class Constant
0 DragItem.DragActionDefault
1 DragItem.DragActionCopy
2 DragItem.DragActionMove
3 DragItem.DragActionLink


The following DropObject event handler can handle either a dropped picture or a dropped file. The type of file that it can handle needs to have been specified in a call to AcceptFileDrop prior to the drop, for example, in the Open event.

If Obj.PictureAvailable Then
Me.Image = obj.Picture
ElseIf Obj.FolderItemAvailable Then
Me.Image = Picture.Open(obj.FolderItem)
End If

See Also

DragItem, Window classes.