LeonLanford
Active member
- Joined
- Dec 2, 2008
- Messages
- 28
- Programming Experience
- Beginner
Hi.. I want to ask how to drag file to exe file?
I'm making upload program now, I can drag the files to the data grid view. Now I want to drag files to the exe file
So if I drag 2 files to the program upload.exe, the program automatically opens and have 2 files inserted to the data grid, for now if I drag the files to the upload.exe, the program only opens but the data is not in the data grid view..
here's code how I get the data inserted to the data grid view, I've seen program like this that I only have to drag the files to the exe and the data is already automatically inserted to the data grid..
Hope someone can help me, thanks..
I'm making upload program now, I can drag the files to the data grid view. Now I want to drag files to the exe file
So if I drag 2 files to the program upload.exe, the program automatically opens and have 2 files inserted to the data grid, for now if I drag the files to the upload.exe, the program only opens but the data is not in the data grid view..
here's code how I get the data inserted to the data grid view, I've seen program like this that I only have to drag the files to the exe and the data is already automatically inserted to the data grid..
VB.NET:
Private Sub dgv_uplot_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles dgv_uplot.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
MyFiles = e.Data.GetData(DataFormats.FileDrop)
total = MyFiles.Length
browse("drag")
End If
End Sub
Private Sub dgv_uplot_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles dgv_uplot.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.All
End If
End Sub
Hope someone can help me, thanks..