ActiveX version had a "dropfiles" event where we could handle multiple files being dropped by the user from a Windows Explorer window. The newer 9.4 .Net version only provide support for "dropfile" event, and only recognize the last file.
How can I recreate this functionality of accepting multiple files at once in the viewer and process them one after the other (I would add pages to the current document.
thx in advance.
Need DropFile example for dragging multiple files at once
Re: Need DropFile example for dragging multiple files at onc
Hello,
You have to catch the DragDrop event like any other user control. This is quite easy, here an example in vb.net:
Kind regards,
Loïc
You have to catch the DragDrop event like any other user control. This is quite easy, here an example in vb.net:
Code: Select all
Private Sub GdViewer1_DragEnter(sender As Object, e As DragEventArgs) Handles GdViewer1.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.All
End If
End Sub
Private Sub GdViewer1_DragDrop(sender As Object, e As DragEventArgs) Handles GdViewer1.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim files() As String = CType(e.Data.GetData(DataFormats.FileDrop), String())
'do something with files() here
End If
End Sub
Loïc
Re: Need DropFile example for dragging multiple files at onc
I'm using the INTEROP module with VB6, and there seems to be no DragEnter event available.
Who is online
Users browsing this forum: No registered users and 1 guest