Results 1 to 3 of 3

Thread: Drag and Drop

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Question Drag and Drop

    I never tried to do any dran and drop stuff, so someone plz help me on this: I want the user to drag a file to an area and I want my program to figure out the file name. I believe it's farily simple for someone who has worked with these stuff, so plz give me a hint

    btw, this is my 700th post
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    Set the OLEDropMode property of the form to Manual (1) and put this code on your form:
    VB Code:
    1. Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    2. If Data.GetFormat(15) = True Then '15 is the format for files; 1 is text (like dragging a link from internet explorer)
    3. For i = 1 To Data.Files.Count
    4.     MsgBox Data.Files(i)
    5. Next
    6. End If
    7. End Sub
    <removed by admin>

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    tnx alot
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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