마우스 이벤트 drag & drop

함흥처사 2014.05.29 05:41:34 *: Public Class Form1

Private Sub TextBox1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles TextBox1.DragDrop
Dim drop As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
For Each filename As String In drop
TextBox1.Text = filename

Next
End Sub

Private Sub TextBox1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles TextBox1.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy
End If
End Sub
End Class
마우스 이벤트 

Drag And Drop