I am trying to drag an item from a ListBox and drop it on a TreeView but can't get any drag events to fire on the TreeView. Here's the core code:
Private Sub lstItems_MouseDown(...)
lstItems.OLEDrag
End Sub
Private Sub lstItems_OLEStartDrag(...)
Data.Clear
Data.SetData lstItems.Text, vbCFText
AllowedEffects = vbDropEffectMove
End Sub
In each OLE drag event on the TreeView I have a comment place marker and breakpoint, but none of these events fire.
When dragging from ListBox, the cursor changes to a "not allowed" cursor (I'm not setting the cursor myself).
I notice that the TreeView takes a MSComctlLib.DataObject and the ListBox a DataObject. This may have something to do with it.
Any ideas? I am stumped!
Private Sub lstItems_MouseDown(...)
lstItems.OLEDrag
End Sub
Private Sub lstItems_OLEStartDrag(...)
Data.Clear
Data.SetData lstItems.Text, vbCFText
AllowedEffects = vbDropEffectMove
End Sub
In each OLE drag event on the TreeView I have a comment place marker and breakpoint, but none of these events fire.
When dragging from ListBox, the cursor changes to a "not allowed" cursor (I'm not setting the cursor myself).
I notice that the TreeView takes a MSComctlLib.DataObject and the ListBox a DataObject. This may have something to do with it.
Any ideas? I am stumped!