Is there another way to list files? As it wont let me remove from the listbox using datasource
Code:
Private Sub cmdRemove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRemove.Click
If lstDisplay.SelectedIndex <> -1 Then
lstDisplay.Items.RemoveAt(lstDisplay.SelectedIndex)
End If
End Sub
Private Sub cmdSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSearch.Click
'Search for torrent files
Dim torrents() As String = System.IO.Directory.GetFiles("C:\Documents and Settings\Sam\Application Data\uTorrent", "*.torrent")
'Display found files
lstDisplay.DataSource = torrents
End Sub