Finally I got the answer...
Private Sub TreeView1_Mouse Up(ByVal sender As Object, ByVal e As System.Windows. Forms.MouseEven tArgs) Handles TreeView1.Mouse Up
' Show menu only if Right Mouse button is clicked
If e.Button = Windows.Forms.M ouseButtons.Rig ht Then
' Point where mouse is clicked
Dim p As Point = New Point(e.X, e.Y)
' Go to the node that the user clicked
Dim node As TreeNode = TreeView1.GetNo deAt(p)
If Not node Is Nothing Then
TreeView1.Selec tedNode = node
' ContextMenuStri p1.Show(TreeVie w1, New Point(e.X, e.Y))
End If
End If
End Sub
Comment