0

i'm making a windows application that would open a program and click on certain coordinates, first i need to know how to get a coordinate, which i already know, but how do I let my mouse click on a certain position? Simply it would be somthing like mouse.Click(coordinate). I don't know, could anyone help?

Regards

1
  • I get this error: A call to PInvoke function 'WindowsProject!WindowsProject.Form1::mouse_event' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature. Commented Jul 26, 2013 at 22:01

1 Answer 1

1

I tried putting this as a comment, but SO wouldn't put the comment up after I typed it, so I had to put what I had as an answer.

Here are two links that might have what you're looking to do: http://social.msdn.microsoft.com/Forums/vstudio/en-US/7b68f005-1d09-4085-b236-b05797df3bf0/how-to-make-the-mouse-click

and

http://social.msdn.microsoft.com/Forums/vstudio/en-US/a2518c35-ed77-42b3-a9c4-705238d714c2/mouse-click

And if you just want to click a button, you could use

button.Performclick()

But I don't think that there's any simple way (such as Mouse.Click()) to make the mouse click anywhere.

HTH

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.