M
Martin
Hi,
I am looking for my program to be notified when a user right clicks on a
particular treenode.
I have placed my code in the "click" event, and I am indeed notified when a
user clicks on the node.
however what I would like to do is be able to tell which mouse button was
used (left or right)
can anybody tell me if this is possibe please and point me in the direction
of a solution to my problem.
Also i am having a little difficulty obtaining the name of the node in the
click event.
The specific code is
Private Sub TreeView1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TreeView1.Click
Dim objNode As New TreeNode
objNode = CType(sender, TreeNode) <---------This cast is aparently
invalid so not sure how to obtain the node name
MessageBox.Show("Button clicked")
MessageBox.Show(objNode.Text)
'Now decide which mouse button was clicked'
NOT sure how to do thos of if this is the correct event to obtain this
info........
End Sub
many thanks in advance.
cheers
martin.
I am looking for my program to be notified when a user right clicks on a
particular treenode.
I have placed my code in the "click" event, and I am indeed notified when a
user clicks on the node.
however what I would like to do is be able to tell which mouse button was
used (left or right)
can anybody tell me if this is possibe please and point me in the direction
of a solution to my problem.
Also i am having a little difficulty obtaining the name of the node in the
click event.
The specific code is
Private Sub TreeView1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TreeView1.Click
Dim objNode As New TreeNode
objNode = CType(sender, TreeNode) <---------This cast is aparently
invalid so not sure how to obtain the node name
MessageBox.Show("Button clicked")
MessageBox.Show(objNode.Text)
'Now decide which mouse button was clicked'
NOT sure how to do thos of if this is the correct event to obtain this
info........
End Sub
many thanks in advance.
cheers
martin.