471,066 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Position of mouse click on PictureBox image


I have an image displayed in a PictureBox and the displayed image is resized
and centred. When I click on the image, I can get the coordinates relative to
the PictureBox but I would like the coordinates to be relative to the image.
I've tried using PointToClient but this gives me wrong values (eg. negative
x). Is there a PictureBox property that I need to change? Or at least a
property which describes the position and size of the displayed image that I
can access from the code?

Thank you in advance

Jun 14 '07 #1
1 4163
You have nothing to loose.

Try ClientToScreen, ScreenToClient, DPtoLP and LPtoDP
Good day

Jun 15 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jay | last post: by
9 posts views Thread by Samantha | last post: by
2 posts views Thread by newbie_csharp | last post: by
19 posts views Thread by wmanzo | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.