Private Sub Form1_DragDrop(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop
Dim s() As String = e.Data.GetData("FileDrop", False)
Dim i As Integer
For i = 0 To s.Length - 1
listBox1.Items.Add(s(i))
Next i
End Sub
Private Sub Form1_DragEnter(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter
If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then
e.Effect = DragDropEffects.All
Else
e.Effect = DragDropEffects.None
End If
End Sub
this is the drag and drop code and wht do u mean with declarations ??
@Dawgy Dawg
---------- Post added at 08:36 PM ---------- Previous post was at 07:57 PM ----------
Originally Posted by
Dawgy Dawg
Yeah the drop code.
It'll be a little more helpful if I saw your Browse button code and Drop code
thats the Browse Button
Code:
openFileDialog1.Filter = "DLL (*.dll) |*.dll"
openFileDialog1.ShowDialog()
and thats the Drop Code
Code:
Private Sub Form1_DragDrop(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragDrop
Dim s() As String = e.Data.GetData("FileDrop", False)
Dim i As Integer
For i = 0 To s.Length - 1
listBox1.Items.Add(s(i))
Next i
End Sub
Private Sub Form1_DragEnter(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter
If (e.Data.GetDataPresent(DataFormats.FileDrop)) Then
e.Effect = DragDropEffects.All
Else
e.Effect = DragDropEffects.None
End If
End Sub
and thats the OpenFileDialog Code
Code:
Private Sub openFileDialog1_FileOk(sender As System.Object, e As System.ComponentModel.CancelEventArgs) Handles openFileDialog1.FileOk
Dim FileName As String = openFileDialog1.FileName.Substring(openFileDialog1.FileName.LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
listBox1.Items.Add(DllFileName)
dlls.Add(DllFileName, openFileDialog1.FileName)
End Sub