We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Show form when node is clicked vb.net

Thread ID:





119402 Jun 16,2015 07:21 PM UTC Jun 17,2015 08:25 AM UTC WinForms 2
Tags: TreeViewAdv
Toby Hutton
Asked On June 16, 2015 07:21 PM UTC


Could someone advise me on how to open a windows form when a child is clicked, i've been trying to work it out without success.


Toby Hutton
Replied On June 16, 2015 07:37 PM UTC

Just sorted it, Re-tweaked a bit of code. For those that a interested be see below, I have included both C# and VB


Private Sub TreeView1_AfterSelect(ByVal sender As Object, ByVal e As EventArgs) Handles TreeView1.AfterSelect
        Dim tn As TreeNodeAdv = Me.TreeView1.SelectedNode
        Select Case tn.Text
            Case "About"
            Case Else
                MessageBox.Show("This node does not have a form associated with it.")
        End Select
    End Sub


private void TreeView1_AfterSelect(object sender, EventArgs e)
	TreeNodeAdv tn = this.TreeView1.SelectedNode;
	switch (tn.Text) {
		case "About":
			MessageBox.Show("This node does not have a form associated with it.");

Ashwini Jaya Preetha Durai Samy [Syncfusion]
Replied On June 17, 2015 08:25 AM UTC

Hi Toby,

Thank you for using Syncfusion products.

We are glad to hear that your requirement has been achieved. It can also be done by using the NodeMouseClick event as in the below code snippet.

Code snippet[ C#]:

  // Loading Form using NodesMouseClick event

        void treeViewAdv1_NodeMouseClick(object sender, Syncfusion.Windows.Forms.Tools.TreeViewAdvMouseClickEventArgs e)


            Form2 form2 = new Form2();      



Code snippet [VB]:

' Loading Form using NodesMouseClick event

              Private Sub treeViewAdv1_NodeMouseClick(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Tools.TreeViewAdvMouseClickEventArgs)

                     Dim form2 As New Form2()

                     If e.Node.Text="ChildNode" Then


                     End If
              End Sub

Sample Location: http://www.syncfusion.com/downloads/support/forum/119402/ze/TreeViewAdvFormLoadSample1324049284

Please let us know if you need any further assistance,



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon