Hi
Can anybody show me how to loop all treeview nodes ini vb.net. I've been working on this for days but still no result.
I got a sample code in vb 6.0, this one works.
Private Sub SaveNested(
Dim TNode As Node
Set TNode = TreeView1.Nodes (1).Roo
While Not TNode Is Nothin
If TNode.children > 0 The
AddChildNodes(T Node
End I
Set TNode = TNode.Nex
Wend
End Su
Private Sub AddChildNodes(B yVal TNode As Node
Dim childNode As Nod
Dim i As Intege
Set childNode = TNode.Chil
For i = 0 To TNode.children - 1
If childNode.child ren > 0 The
AddChildNodes(c hildNode
End I
Set childNode = childNode.Nex
Nex
End Su
I tried to rewrite the code in vb.net, but then stuck in using treeview(.net) properties. Could advice me how to write this in vb.net
Thank
Yant
Can anybody show me how to loop all treeview nodes ini vb.net. I've been working on this for days but still no result.
I got a sample code in vb 6.0, this one works.
Private Sub SaveNested(
Dim TNode As Node
Set TNode = TreeView1.Nodes (1).Roo
While Not TNode Is Nothin
If TNode.children > 0 The
AddChildNodes(T Node
End I
Set TNode = TNode.Nex
Wend
End Su
Private Sub AddChildNodes(B yVal TNode As Node
Dim childNode As Nod
Dim i As Intege
Set childNode = TNode.Chil
For i = 0 To TNode.children - 1
If childNode.child ren > 0 The
AddChildNodes(c hildNode
End I
Set childNode = childNode.Nex
Nex
End Su
I tried to rewrite the code in vb.net, but then stuck in using treeview(.net) properties. Could advice me how to write this in vb.net
Thank
Yant
Comment