Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drag from listview to treeview problem (simple I think) 1

Status
Not open for further replies.

nickske80

Programmer
Aug 2, 2003
55
0
0
BE
I am creating a form with a listview and a treeview.

I am progging the function to drag and drop the listview items on the treeview.

I have the following code :


Private Sub lvwLinks_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)


If Button = vbLeftButton Then
Set mltmCurrent = lvwLinks.HitTest(x, y)
lvwLinks.DragIcon = mltmCurrent.CreateDragImage
lvwLinks.Drag vbBeginDrag
End If

End Sub

But it doesn 't seem to work.

If i use the breakpoints, it doesn 't seem to get into the if statement, no matter what I trie to do.

Can anyone help me with this?

thanx.
 
Try putting the code you've shown here in the MouseDown event instead of MouseMove.

Hope this helps.
 
thanx ClickHere,

That seemed to do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top