Image coordinates

  • Thread starter Thread starter emferrari
  • Start date Start date
E

emferrari

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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top