Hi I know about the good faith rules but this was more a question of guidence more than anything else which is also said is ok to ask questions about new arias of programming
I have learnt about nodes and root and childs I am using visual basic 2008 express edition and need
to add C:\ drive to the treeview so in my program I can view the contents of the c drive from a treeview
is this possible and dose anyone have any tips of where I could go or any code sniptis that would help me add C:\ directories to a treeview I am very new to treeview so that is why I have come here for help
Kind Regards
Bradley Scott
Treeview Directory HelpTreeview Directory Help
Page 1 of 1
2 Replies - 2629 Views - Last Post: 20 September 2010 - 11:21 AM
Replies To: Treeview Directory Help
#2
Re: Treeview Directory Help
Posted 20 September 2010 - 11:02 AM
Check out the DIC tutorials .... How to Design a basic Windows Explorer
#3
Re: Treeview Directory Help
Posted 20 September 2010 - 11:21 AM
You basically write a recursive directory search. The slimmed down version.
If there are more directories it keeps calling our sub. I like to use the DirectoryInfo object myself.
'psuedo code
Private Sub getDirectoriesForTreeView(ByVal dir As String, node As TreeNode)
For each directory in dir
add new node with node text being the directory name
to the node starting with the root node - usually
getDirectoriesForTreeView(directory, <the new node we made>)
Next
End Sub
If there are more directories it keeps calling our sub. I like to use the DirectoryInfo object myself.
This post has been edited by hawkvalley1: 20 September 2010 - 11:21 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|