I want the best way to get the mouse position for a form.
I, m now set mouse position values ββin variables to get them in other Like Like1_Click methods.
Is there a better way to do this?
Thank you very much.
How does it work for you?
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onmousemove.aspx
Another variant:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseposition.aspx
then to use it in the form use:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.pointtoclient.aspx
xm=System.Windows.Forms.Cursor.Position.X - this.Location.X ym=System.Windows.Forms.Cursor.Position.Y - this.Location.Y
then you should do:
xm - form border x ym - form border y