I read this post: How to simulate Mouse Click in C#?.
It was helpful but I could not click the point I want. I think the x and y variables are corresponding to screen coordinates. I wanted to set the values according to my program(form).
I read this post: How to simulate Mouse Click in C#?.
It was helpful but I could not click the point I want. I think the x and y variables are corresponding to screen coordinates. I wanted to set the values according to my program(form).
to transform your coordinates check following function available in your Form
public class Control
{
public Point PointToScreen(Point p);
}
to read/write screen coordinates you may use
public sealed class Cursor
{
public static Point Position { get; set; }
}
Are you just needing to click a button? You can call buttonName.Click
Also, you could add in a label and have onMouseMove update the X,Y. This may help you get better coordinates