Link to home
Start Free TrialLog in
Avatar of kevinmeredith
kevinmeredith

asked on

click on a picture

Hello,
I'm importing a picture of a cabinet and i was wondering if there was anyway to have different events fire off when a specific location is clicked on the picture.  for example, i have a picture of the cabinet with 5 drawers.  i want to be able to go to a specific drawer if the user double clicks on it.  This is for an inventory project i'm working that i would then get the info from a DB.  I know each picturebox has a doubleclick event, but my understanding of that is its for the entire picturebox.  Am i making sense with my question?  thanks for the help!

Avatar of jake072
jake072
Flag of Canada image

You could trap the location of the mouse in the MouseMove event, and use that in conjunction with the doubleclick to find out where the mouse is...

Jake
Avatar of kevinmeredith
kevinmeredith

ASKER

can you give me an example please jake?  i'm not familiar with MouseMove
ASKER CERTIFIED SOLUTION
Avatar of jake072
jake072
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks Jake.  I will try that.  with the holiday weekend, i might not reward you the points or ask any additional questions for a while.  just to let you know.  thanks!
Jake's suggestion is the way to go if you don't want to get into subclassing or third-party controls. If you are willing to use a third-party control, there are lots. Google ImageMap and VB.

ctm5
oops, sorry Jake, didn't know you were still around.

ctm5
ctm5 - no worries!

We're all here to help!

Jake
Yeah, but I hate stepping one someone's toes!
that worked awesome Jake!  thanks alot