> Ya i actually did it by the way u mentioned only:) But i need to get
> the coordinates of the location i click(mouse down) in mm. How to do
> it?
I admit, I don't know that one off the top of my head. The page units
property is for drawing (i.e. used with the Graphics class), while mouse
events are part of the control/UI API (i.e. used with the Control class).
I realize those things seem connected, but in a lot of ways they aren't.
There might be a method you can call that would transform pixel
coordinates to millimeter coordinates without the use of a Graphics
instance, but if there is I don't know about it. And I don't think you
want to be grabbing a Graphics instance every time you need to transform
coordinates.
You may find that it makes more sense for you to handle the transformation
directly. Rather than setting the Graphics to use millimeters when you
draw, instead create a Matrix representing the transformation you want,
along with an inverse Matrix of that transformation. Then when you draw,
set the Graphics.Transform to the matrix, and when you want to map pixels
back to millimeters, used the inverse transformation directly.
If no one else is able to answer your question but you do find a method
already built in that does what you need, please follow-up here with that
information. I think I would have seen it if it exists, but there's no
guarantee...I might have missed it, and obviously it'd be a useful thing
to know. :)
Pete
On Mar 10, 9:36 am, vicky87....@gmail.com wrote:
> Ya i actually did it by the way u mentioned only:) But i need to get
> the coordinates of the location i click(mouse down) in mm. How to do
> it?
I don't think you can. The PC has no way of telling whether it is
connected to a 15 inch LCD display, or a projector that is producing
an image 15 feet across.