Results 1 to 4 of 4

Thread: [RESOLVED] Drag and Drop

Hybrid View

  1. #1
    Addicted Member
    Join Date
    Apr 12
    Posts
    152

    Resolved [RESOLVED] Drag and Drop

    I have this code to add an item to my listbox, it works when dragging items from my hard drive but attachments in outlook can't be dragged and dropped.

    What is wrong?


    vb.net Code:
    1. If e.Data.GetDataPresent(DataFormats.FileDrop) Then
    2.  
    3.             Dim droppedFilePaths As String() = TryCast(e.Data.GetData(DataFormats.FileDrop, True), String())
    4.  
    5.             For Each droppedFilePath As String In droppedFilePaths
    6.                 Dim fileItem As New ListBoxItem()
    7.  
    8.                 fileItem.Content = System.IO.Path.GetFileNameWithoutExtension(droppedFilePath)
    9.                 fileItem.ToolTip = droppedFilePath
    10.                 listbox.Items.Add(fileItem)
    11.             Next
    12.         End If

  2. #2
    Addicted Member
    Join Date
    Apr 12
    Posts
    152

    Re: Drag and Drop

    Help

  3. #3
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 02
    Location
    Eygelshoven
    Posts
    1,556

    Re: Drag and Drop

    What happens when you debug?
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

  4. #4
    Addicted Member
    Join Date
    Apr 12
    Posts
    152

    Re: Drag and Drop

    Quote Originally Posted by Lightning View Post
    What happens when you debug?
    It steps right over it.

    I got the answer, you need to read a filestream. i'll post my code later for other users.

Posting Permissions

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