by kAOs (9 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 25th September 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Recursive function to load system folders into a treeview.
API Declarations
Microsoft Common Controls 6 t = TreeView
RFunction "C:\WINNT", True
End Sub
Private Function RFunction(CNode As String, RNode As Boolean)
Dim f As New FileSystemObject, TNode As Folder
If RNode Then t.Nodes.Add , , CNode, CNode
For Each TNode In f.GetFolder(CNode).SubFolders
t.Nodes.Add t.Nodes(CNode), 4, TNode, TNode.Name
RFunction TNode.Path, False
Next
End Function