I am very new to winforms and automation in general, and was wondering if there is a simple way to force the cursor to click in C#. I am already moving the cursor to the right spot, and I want to make it perform a click. Is there code that will do this, without getting super complicated. (for clarity, I am automating a mouseclick on a button in another application, which has been opened at this point)
Here is how I set the cursor position:
Cursor.Position = new Point(x, y);