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

Image coordinates

P: n/a
Hi all

I'm developing a windows form application that has a picturebox in
which I'll load screen prints from a jpg file. I want the user to click
in one point in the image and after the click fill two text boxes with
the X and Y coordinates of that click, but the coordinates need to be
based in the image only not in the whole form. I did not find anything
that tells me about this in the internet. Does somebody here already
did something similar and can give me some help?

Thanks!

Eduardo

May 17 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If you handle the MouseClick event in the PictureBox itself, the
MouseEventArgs should give you the relative coordinates within that Control.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

<em*******@gmail.com> wrote in message
news:11*********************@38g2000cwa.googlegrou ps.com...
Hi all

I'm developing a windows form application that has a picturebox in
which I'll load screen prints from a jpg file. I want the user to click
in one point in the image and after the click fill two text boxes with
the X and Y coordinates of that click, but the coordinates need to be
based in the image only not in the whole form. I did not find anything
that tells me about this in the internet. Does somebody here already
did something similar and can give me some help?

Thanks!

Eduardo

May 17 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.