Public Class drag_files
Private Sub drag_files_DragEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles MyBase.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop, False) = True Then
e.Effect = DragDropEffects.All
End If
End Sub
Private Sub drag_files_DragDrop(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles MyBase.DragDrop
Dim drop_files() As String = e.Data.GetData(DataFormats.FileDrop)
If drop_files.Length > 0 Then
For Each elem In drop_files
MessageBox.Show(elem)
Next
End If
End Sub
End Class
' Propiedades AllowDrop = True
' https://www.youtube.com/watch?v=OyKv1Xcod6c
No hay comentarios.:
Publicar un comentario