How do I catch a right click of the mouse in a Button

M

Moises Durovni

Hi Folks,

I need to know if the right button of the mouse was clicked on top of a
button. How do I catch this?

TIA

Moises
 
S

Siva M

Handle MouseDown or MouseUp event and check e.Button property.

Hi Folks,

I need to know if the right button of the mouse was clicked on top of a
button. How do I catch this?

TIA

Moises
 
P

Phil G.

Hi,

Check the properties of the MouseEventArgs which is the 2nd passed param of
any mouse event,

ie.

Private Sub btn_MouseDown(ByVal sender as object, e as MouseEventArgs)
handles .....

if e.button.right then
do stuff
end if

End Sub

HTH, Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top