Hello everyone.
Can anyone give a link to a good guide/tutorial on how to populate a treeview with the drives of a system. I am able to get the drives listed, but am i having a problem creating the child nodes for the drives and really have never used a tree view before. Any info is appreciated.
Below is what i have tried ( just to show my attempt). i know its wrong, so any tutorials or advice is appreciated.
PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With tvDrives
.BeginUpdate()
For Each dr As DriveInfo In DriveInfo.GetDrives()
.Nodes.Add(dr.Name)
Next
.EndUpdate()
EndWith
EndSub
PrivateSub tvDrives_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles tvDrives.AfterSelect
With tvDrives
For Each dr As DriveInfo In DriveInfo.GetDrives()
DimdirAsNew DirectoryInfo(dr.Name)' i want to try and use the selected node, but i am having trouble figuring this out and i just used this instead to make it work temporarily.
.ShowPlusMinus = True
For Each d As DirectoryInfo In Dir.GetDirectories()
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.