Post by ranilwallace on Nov 23, 2015 5:45:35 GMT 10
I could help you a bit.. You will need : list view named listview1 imagelist Public Sub populate(path As String) Try listview1.Items.Clear() For Each str As String In My.Computer.FileSystem.GetDirectories(path) Dim lvi As ListViewItem = listview1.Items.Add(IO.Path.GetFileName(str), 0) lvi.Tag = str Next
For Each str As String In My.Computer.FileSystem.GetFiles(path)
Dim lvi As ListViewItem = listview1.Items.Add(IO.Path.GetFileName(str), 1) lvi.Tag = str Next
Catch ex As Exception If path.EndsWith("My Documents") Then path = My.Computer.FileSystem.SpecialDirectories.MyDocuments populate(path)
ElseIf path.EndsWith("My Pictures") Then path = My.Computer.FileSystem.SpecialDirectories.MyPictures populate(path) ElseIf path.EndsWith("My Music") Then path = My.Computer.FileSystem.SpecialDirectories.MyMusic populate(path) End If End Try End Sub
Private Sub listview1_DoubleClick(sender As Object, e As System.EventArgs) Handles listview1.DoubleClick If My.Computer.FileSystem.FileExists(listview1.FocusedItem.Tag.ToString) Then Process.Start(listview1.FocusedItem.Tag.ToString) ElseIf My.Computer.FileSystem.DirectoryExists(listview1.FocusedItem.Tag.ToString) Then populate(listview1.FocusedItem.Tag.ToString) End If End Sub
Ranil, Lauve Tech
|
|
Post by Prezence on Nov 24, 2015 23:30:17 GMT 10
Really pretty simple. Just keep a variable string of the folder you just loaded and when an item is clicked go to that folder name + the item text. Then update the current directory string. Should work
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
|
|
Post by Prezence on Nov 26, 2015 0:08:24 GMT 10
That's why you update the directory string..... So on double click say DIRECTORYSTRING += THEITEMTEXTYOUCLICKED. Then call your updating function
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
|
|
Post by ranilwallace on Nov 26, 2015 12:39:38 GMT 10
Have you tried the code i gave you?
Ranil, Lauve Tech
|
|