2
Contributors
5
Replies
7
Views
9 Years
Discussion Span
Last Post by Jx_Man
2

this will detect if mouse button clicked :

Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
        If e.Button = MouseButtons.Left Then
            MsgBox("left button clicked")
        ElseIf e.Button = MouseButtons.Right Then
            MsgBox("Right button clicked")
        End If
    End Sub
Votes + Comments
thx..i didn't know how easy it is
0

Ok..Thats worked.
i convert it into select-case.
thanks for direction :)

1

this is my convert code :

Select Case e.Button
            Case MouseButtons.Left
                MsgBox("left button clicked")
            Case MouseButtons.Middle
                MsgBox("Right button clicked")
            Case MouseButtons.Right
                MsgBox("Middle button clicked")
        End Select
Votes + Comments
nice converting
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.