Right Click Image detection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • The Roys

    Right Click Image detection

    I want to be able to detect if an image has been right-clicked. I have 5
    images in my program. If I Click the image it gets selected by my program.
    But I want to be able to Right-Click one of the images which will mean all
    other images will be selected.
    eg:
    Private Sub Image1_Click(In dex As Integer) ' I want it to be a R/Click not a
    Click
    For x = 0 to 4
    If (x <> index) then
    ImgSelected(x) = True
    Else
    ImgSelected(x) = False
    Next x
    End Sub

    This function will flag the other 4 images as selected
    How do I detect a R/Click as opposed to a Click If this is not possible for
    some reason, what about Shift-Click.

    Thanks
    Trevor.




  • Rick Rothstein

    #2
    Re: Right Click Image detection

    > I want to be able to detect if an image has been right-clicked. I have 5[color=blue]
    > images in my program. If I Click the image it gets selected by my program.
    > But I want to be able to Right-Click one of the images which will mean all
    > other images will be selected.
    > eg:
    > Private Sub Image1_Click(In dex As Integer) ' I want it to be a R/Click not[/color]
    a[color=blue]
    > Click
    > For x = 0 to 4
    > If (x <> index) then
    > ImgSelected(x) = True
    > Else
    > ImgSelected(x) = False
    > Next x
    > End Sub
    >
    > This function will flag the other 4 images as selected
    > How do I detect a R/Click as opposed to a Click If this is not possible[/color]
    for[color=blue]
    > some reason, what about Shift-Click.[/color]

    You can't detect right/left click in the Click event... use either the
    MouseDown or MouseUp event depending on the logical flow requirements of
    your code.

    Rick - MVP


    Comment

    Working...