i have my treeview made in winforms like this
---------------------------------------------
Countries
--- Canada
--- USA
--- India
------------------------------------
i want to load this cites on a listview click on the Node Canada and will show all indian cities
could you guys explain this how to do in Treeview and winforms i had tried but when i click on Canada do not show to load Frm_2.Show
how i can do this i never work with treeview
Private Sub TreeView_Countries_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles TreeView_Countries.AfterSelect
Dim node As TreeNode
For Each node In TreeView_Countries.Nodes(0)
' Select the appropriate node based on which button was clicked.
Select Case node.Text
Case "Canada"
' If the button clicked was "Chapter One", select the node
' using the Selected property.
If e.CommandName = "Chapter One" Then
' Select the node using the Selected property.
node.Selected = True
End If
Case "USA"
' If the button clicked was "Chapter Two", select the node
' using the Selected method.
If e.CommandName = "Chapter Two" Then
' Select the node using the Select method.
node.Select()
End If
Case "India"
' If the button clicked was "Chapter One", select the node
' using the Selected property.
If e.CommandName = "Chapter One" Then
' Select the node using the Selected property.
node.Selected = True
End If
Case Else ' Do nothing. End Select Next End Sub