is there a way to detect when a user right clicks on a menu item?? if so how?
Printable View
is there a way to detect when a user right clicks on a menu item?? if so how?
Look at the MouseDown event, and then check e.Button to see which mouse button was clicked.
there is no mouse down event for clicking on a menuItem only a click event and it dosent have an e nor does it event fire when you click it with the right mouse button
Uhmmmm....if you can accept this way:
Press your right button ---> Holding right button pressed, press the left button.
In this way you can use something like:
VB Code:
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click If Me.MouseButtons = MouseButtons.Right Then MessageBox.Show("Right one") Else MessageBox.Show("Left one") End If End Sub
It seems to work.
Is ti useful for you?:confused:
Good job:)
well ive decided to do it a different way but thanks for your responce