How i can set starting point of coordinate system in top left corner of Form ? Because it set starting point on top left corner of monitor not form but I need starting point in top left corner of Form..
Here is code what i'm try to do:
int x, y;
string _x, _y;
private void GetCursor()
{
_x = MousePosition.X.ToString();
x = int.Parse(_x);
label2.Text = _x;
_y = MousePosition.Y.ToString();
y = int.Parse(_y);
label4.Text = _y;
}
private void MoveButton()
{
button1.Location = new Point(x,y);
}
private void timer1_Tick(object sender, EventArgs e)
{
GetCursor();
MoveButton();
}
Thanks.