
Originally Posted by
JohnRChick
I haev a picture, and I'm currently coding in the picturebox_Clicked method. How can I differentiate between which mouse button is being clicked here and do different tasks..
Ex.
Right button -- msgbox "right"
left button -- msgbox "left"
Hi,
You could try this;
VB Code:
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
If e.Button = MouseButtons.Left Then
TextBox1.Text = "Button Left" & Space(1) + CStr(e.X) + "," + CStr(e.Y)
End If
If e.Button = MouseButtons.Right Then
TextBox1.Text = "Button Right" & Space(1) + CStr(e.X) + "," + CStr(e.Y)
End If
End Sub
I couldn't find anything more.
sparrow1