Hi all,
I am currently using command buttons to tell my program
to transfer the contents of one listbox to another.
How could I do the drag and drop function between two listbox?? Thanx in advance.
Printable View
Hi all,
I am currently using command buttons to tell my program
to transfer the contents of one listbox to another.
How could I do the drag and drop function between two listbox?? Thanx in advance.
Try this:
Code:Dim StartDrag As Boolean
Private Sub List1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
StartDrag = True
strTemp = List1.Text
End Sub
Private Sub List2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If StartDrag = True Then
List2.AddItem List1.Text
List1.RemoveItem List1.ListIndex
End If
StartDrag = False
End Sub
I discovered the solution I wanted with the OLE_dragdrop.
Thanx for your kind and prompt assistance.