Hello,
I am looking for the right Object Typ to put in the DoDragDrop() Function.
I tried it with an IName Object and an IDataObject but ArcMap does not accept these Typs.
The Drag&Drop even works with the Windows Explorer so it musst be a common Object Typ. I bet this is somewhere in the "ArcObjects Help" but I can't find it, sorry. :-)
My Item schould be draged out of a TreeView into ArcMap. Thats my Code:
I am looking for the right Object Typ to put in the DoDragDrop() Function.
I tried it with an IName Object and an IDataObject but ArcMap does not accept these Typs.
The Drag&Drop even works with the Windows Explorer so it musst be a common Object Typ. I bet this is somewhere in the "ArcObjects Help" but I can't find it, sorry. :-)
My Item schould be draged out of a TreeView into ArcMap. Thats my Code:
Code:
Private Sub tvTree_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles tvTree.ItemDrag
'Get the IName Object of the TreeNode
Dim pTreeNode As TreeNode
pTreeNode = e.Item
Dim pclsTreeNode As clsTreeNode
pclsTreeNode = pTreeNode.Tag
Dim pName As IName
pName = pclsTreeNode.NodeObject
If Not pName Is Nothing Then
'Create IData Object
Dim pDataObject As Windows.Forms.IDataObject
pDataObject = New Windows.Forms.DataObject
pDataObject.SetData(pName)
DoDragDrop(pDataObject, DragDropEffects.All)
End If
End Sub