Re: Mouse position question
Jonathan Pobst <[email protected]>
| Newsgroups | gmane.comp.gnome.winforms |
|---|---|
| Message-ID | <[email protected]> |
On 12/21/2009 9:35 AM, Paul wrote: > Hi, > >> I m not sure to completely understand your question, but did you look >> at screen bound ? >> yu should know, the position of the form on the screen and it size >> .... > > I have a form with an image as a background image. It has a size of > 800x600. If I click in the middle of the image, it returns x = 400, y = > 300 which is fine. If I resize to 400 x 300, the middle becomes x = 200, > y = 150. I think it's something like: x = (800 * e.X) / Form.Bounds.Width; y = (600 * e.Y) / Form.Bounds.Height; Jonathan _______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list