I have a Treeview with 5 nodes on it, Tc3p1 is the name & tag of the specific node I want the user to click on in my treeview to run the code below. It should show the output to the Label1 that I also have on the form. My code isn't working at all and I need a full working code example like I have done so that I can get it to work.
Thanking replies in advance.
VB.NET:
Private Sub TreeView1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterSelect
If Tc3p1.Selected = True Then
Dim r As New System.Random()
Label1.Text = r.Next(0, 9)
End Sub