Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
MsgBox "左"
ElseIf Button = 2 Then
MsgBox "右"
End If
If TreeView1.HitTest(x, y) Is Nothing Then
MsgBox "无节点"
Else
MsgBox "节点" & TreeView1.HitTest(x, y).Text
End If
End Sub