Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer,
_
x As Single, y As Single)
Set
dragNode = TreeView1.HitTest(x, y)
End Sub
Private Sub TreeView1_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As
Long, Button As Integer, Shift As Integer, x As Single, y As
Single)
If Not dragNode Is Nothing Then MsgBox
(dragNode.Text)
End Sub
Private Sub TreeView1_OLEStartDrag(Data As MSComctlLib.DataObject,
_
AllowedEffects As Long)
'If
you want to allow parent node dragging, delete the line
below
If dragNode.Parent Is Nothing Then Set
dragNode = Nothing
End Sub
Private Sub TreeView1_OLEDragOver(Data As MSComctlLib.DataObject,
_
Effect As Long, Button As Integer, Shift As
Integer, _
x As Single, y As Single, State As
Integer)
If Not dragNode Is Nothing
Then
TreeView1.DropHighlight =
TreeView1.HitTest(x, y)
End If
End Sub