Hi,
I can find where my mouse is clicked on a form using MouseEventArgs e.X and
e.Y and the world is good. However, if my window size is varied, the
position of X and Y will change depending on the size of the window.
Is there a nice, simple way to find the X and Y position that will always
work
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
2009/12/21 PFJ :
>
> Hi,
>
> I can find where my mouse is clicked on a form using MouseEventArgs e.X and
> e.Y and the world is good. Howe
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 return
if after resizing the form, the picture stay 800*600(no dock.fill) and
have scroll bars, take the XY of the picture/click event rather the
form
2009/12/21 Paul :
> Hi,
>
>> I m not sure to completely understand your question, but did you look
>> at screen bound ?
>> yu should know, the position of
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. I
On your mouse event handler, divide the current mouse position by the
window size. This will give you two floating point values between 0 and
1, where 0 means the top or left edge of the window and 1 the bottom or
right edge.
The point (x, y) = (0.5, 0.5) is the exact center of the window.
στι