-
I'm trying to set up the drap and drop option between 2 listboxes and it will not work. When you click on it the icon changes and it looks like it is going to drag, but it will not drop anywhere. The main purpose of this is to be able to drag the files instead of having to select the text and then click add.
-
List 1 is the list box that things will be dragged from.
List 2 is the list to drop things on.
Code:
'set these properties at design time, or in code somewhere
List1.OLEDragMode = 1
List2.OLEDropMode = 1
'this adds the draged item to the list
Private Sub List2_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
List2.AddItem Data.GetData(1)
End Sub