• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 478
  • Last Modified:

TreeView.DragIcon = ccNoDrop

Why can't I just set the icon to one of the standard pointers ?
I see alot of examples using:
TreeView.DragIcon = TreeView.SelectedItem.CreateDragImage

but I don't want to create an image.

1 Solution
sidwelleAuthor Commented:
Found it !
"Dragging the OLE Drag Source over the OLE Drop Target"

Private Sub TreeView_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)

'    vbDropEffectNone 0 Drop target cannot accept the data.
'    vbDropEffectCopy 1 Drop results in a copy. The original data is untouched by the drag source.
'    vbDropEffectMove 2 Drag source removes the data.
    Effect = vbDropEffectNone
End Sub

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now