Results 1 to 2 of 2

Thread: drag & drop multiple files in form

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2008
    Posts
    1

    drag & drop multiple files in form

    Hello!
    i'm trying to drag & drop multiple files from the windows explorer into my form.
    Now i can only do this with only one file; whem i select more files and i drag & drop them in my form i receive only one file.
    Do you have any idea how i can do this?

    Thank You!


    Carlos Feliu

  2. #2
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: drag & drop multiple files in form

    Simple way is to use a listbox and drop the files on that.

    Code:
    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 Integer
        For i = 1 To Data.Files.Count
            List1.AddItem Data.Files(i)
        Next i
    End Sub
    
    Private Sub Form_Load()
        List1.OLEDropMode = 1
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width