Node click doesn't care what button you clicked with. What you can do is to use a MouseDown event to check if the user clicked with the right mouse button.
Code:Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) Dim nodCurrent As Node If Button = vbRightButton Then Set nodCurrent = TreeView1.HitTest(x, y) If Not nodCurrent Is Nothing Then nodCurrent.Selected = True MsgBox "You right clicked on " & nodCurrent.Text End If End If End Sub




Reply With Quote