CodeItBetter Programming Another VB Programming Blog

How to Drag/drop files from explorer to a listbox

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
'Controls - How to Drag/drop files from explorer to a listbox
Private Sub Form_Load()
    List1.OLEDropMode = vbOLEDropManual
End Sub
 
Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, _
    Shift As Integer, X As Single, Y As Single)
    Dim I As Long
 
    For I = 1 To Data.Files.Count
        List1.AddItem Data.Files(I)
    Next I
End Sub

Related posts:

  1. How to Drag files from Windows Explorer to a form and get their full path
  2. How to enable the user to drag and drop items between two list boxes
  3. How to implement Drag and Drop in TreeView Control
  4. How to Drag/Move items from one List Box to another List Box
  5. How to display a picture if you drag the Picture file to Picture Box
  6. How to add item to a multi-column Listbox (in two ways)
  7. How to select items in ListBox with right mouse button
  8. How to limit selections in a listbox control
  9. How to detect on which item the Mouse is hover on ListBox
  10. How to Drag controls even at Runtime

Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.