Here is something I did which places dropped items in a CheckListBox. The
code is more or less a copy from a webpage (don't remember were from).
Private Sub Form1_DragEnter (ByVal sender As Object, ByVal e As
System.Windows. Forms.DragEvent Args) Handles MyBase.DragEnte r
If e.Data.GetDataP resent(DataForm ats.FileDrop) Then
e.Effect = DragDropEffects .Copy
End If
End Sub
Private Sub Form1_DragDrop( ByVal sender As Object, ByVal e As
System.Windows. Forms.DragEvent Args) Handles MyBase.DragDrop
If e.Data.GetDataP resent(DataForm ats.FileDrop) Then
Dim draggedFiles As String() =
CType(e.Data.Ge tData(DataForma ts.FileDrop), String())
For Each strFileName As String In draggedFiles
With ListBox1
.Items.Add(strF ileName)
.SetSelected(.I tems.Count - 1, True)
.SetItemChecked (.SelectedIndex , True)
End With
Next
Me.ActiveContro l = ListBox1
End If
End Sub
Hope this helps you.
"pmclinn" <pe***@mclinn.c om> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
Does anyone have some sample code that would show me how to drag and
.doc or exe file to a drop target and then extract the file path on
drop?