I have a file viewer control which came with the VbPowerPack. I'm trying to get the drag and drop functionality going for files, but everytime I drop it in, it just shows up as the full file string and not an image. Has anyone had experience with this? Do I need to do somekind of refresh?
Thanks in advance,
Chris
Here is what i have for the dragdrop
Thanks in advance,
Chris
Here is what i have for the dragdrop
Code:
Private Sub ListBox1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles FileViewer1.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim MyFiles() As String
Dim i As Integer
' Assign the files to an array.
MyFiles = e.Data.GetData(DataFormats.FileDrop)
' Loop through the array and add the files to the list.
For i = 0 To MyFiles.Length - 1
FileViewer1.Items.Add(MyFiles(i))
Next
End If
End Sub