By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,888 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,888 IT Pros & Developers. It's quick & easy.

Right Click Image detection

P: n/a
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(Index 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.


Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
> 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(Index 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.


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
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.