Try this
Function GetTreeNodesString(ByVal parent As TreeView)
Dim nodesName As String = ""
For Each root As TreeNode In parent.Nodes
nodesName = nodesName & "+" & root.Text & Environment.NewLine
nodesName = nodesName & GetChildNodesString(root, 1)
Next
Return nodesName
End Function
Function GetChildNodesString(ByVal childNode As TreeNode, ByVal level As Integer) As String
Dim nodesName As String = ""
Dim spacer As String = " "
For i As Integer = 0 To level - 1
spacer &= spacer
Next
For Each node As TreeNode In childNode.Nodes
nodesName = nodesName & spacer & "+" & node.Text & Environment.NewLine
nodesName = nodesName & GetChildNodesString(node, level + 1)
Next
Return nodesName
End Function