Drag and Drop between TreeView and ListView

C

Craig Buchanan

I have an instance of the MS TreeView and an instance of the MS ListView on
my Access 2003 form. I am trying to determine what is being dropped on each
control in the OleDragDrop event. So far, my code is pretty simple:

Private Sub ListView1_OLEDragDrop(Data As Object, Effect As Long, Button As
Integer, _
Shift As Integer, x As Single, y As Single)

If TypeOf Data Is Node Then
MsgBox "node"
ElseIf TypeOf Data Is ListItem Then
MsgBox "listitem"
End If

End Sub

There is similar code for the TreeView's event.

I'm having difficulty identifying the Data that is being dropped. When I
step thru the code and examine the Data parameter, the typename() function
indicates that the object is 'IVBDataObject'.

Is there a better way to test the dropped object?

Thanks,

Craig Buchanan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Listview Double Click 5
treeview control issue 1
Listview checked item 0
Treeview 4
Treeview Control Images Problem 4
ListView Control 0
Remove the selected node in a treeview (A2007) 3
Treeview code 0

Top