Hope you are all well!

Right then, my app needs to re-populate a tree view at runtime with the nodes that were in it from the last time the application was closed.

I write the structure to the registry like this:-

VB Code:
  1. Private Sub mapNodes(ByVal myNode As TreeNode)
  2.  
  3.         Dim subNode As TreeNode
  4.         Dim i As Integer
  5.  
  6.         'Iterate through each sub-node.
  7.         For Each subNode In myNode.Nodes
  8.             'If this node has children, recurse through them...
  9.             If subNode.GetNodeCount(False) > 0 Then
  10.                 mapNodes(subNode)
  11.             Else
  12.                 'this node has no children so map it's full path.
  13.                 nodeMap += subNode.FullPath & ":"
  14.             End If
  15.         Next
  16.  
  17.     End Sub

This basically writes the following string to the registry (elsewhere in the code).

User's Home Folder\Word\Docs\Personal:User's Home Folder\Word\Docs\Business:User's Home Folder\Excel:User's Home Folder\Powerpoint:

As you can see, each full node path is seperated by a colon, and each individual node and it's sub-nodes are seperated by a slash.

I know how to retrieve the string back from the registry but am having enormous trouble getting the information back into the correct tree node structure.

Any ideas??