Results 1 to 3 of 3

Thread: Drag and Drop from Explorer

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    France, Paris
    Posts
    9

    Post

    I would like to drag and drop a file from Explorer or any other application, to my application (destination could be a listbox, a textbox, ....).

    how could i do that ???

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    sure, for a listbox

    set OLEDropMode for the list to manual

    then do this:

    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
    MousePointer = 11
    
    For i = 1 To Data.Files.Count
    
        List1.AddItem Data.Files(i)
    Next i
    
    MousePointer = 0
    
    End Sub
    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company



  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    France, Paris
    Posts
    9

    Post

    It works !!!! Thanks a lot !!!!

    The OLEDropmode set to Manual was missing
    in my code.

    I Hope to help you once....

    Paco

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