我是要達到這樣的要求;
黨鼠標右擊treeview的目錄樹上的某一條時,便出來一彈出菜單
如果未擊中其中任一條,就不彈出.如何判斷是否擊中.用鼠標右鍵.

解决方案 »

  1.   

    用treeview控件的NodeClick事件嘛!
    此事件在treeview控件的Click事件先发生!!!
      

  2.   

    Private Sub treeview1_MouseDown(Button As Integer, _
            Shift As Integer, X As Single, Y As Single)
        
            If treeview1.HitTest(X, Y) Is Nothing Then Exit Sub
            ......
    End Sub
      

  3.   

    If treeview1.HitTest(X, Y) Is Nothing Then Exit Sub之前加上:
    If Not(Button And 2) Then Exit Sub