I currently have a script which allows you to drag and drop a file into a box, and it displays the path of it into a list box. I would like to be able to get the process name of the file so that I am able to check whether it is running already or not, or any help in regards to another alternative route to achieving this?
Here is my current code. Any help much appreciated
Here is my current code. Any help much appreciated
Code:
Private Sub listSoftware_DragEnter(sender As Object, e As DragEventArgs) Handles listSoftware.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Move
End If
End Sub
Private Sub listSoftware_DragDrop(sender As Object, e As DragEventArgs) Handles listSoftware.DragDrop
Dim file As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
For Each fileName As String In file
listSoftware.Items.Add(fileName)
Next
End Sub