0

I want to simulate a simple left mouse click that would be "pressed" after 5 seconds I clicked a simple button form. enter link description here

I tried that way but it didn't work. Couldn't things be simplier?(sry I'm new here)

Community
  • 1
  • 1

1 Answers1

1

Unfortunately for a relatively low level operation like this, you'll have import the user32 WinAPI dll and do exactly what the answers in your link suggested. The only simpler thing to do is to use a library someone else built that wraps around the WinAPI, like http://inputsimulator.codeplex.com/ as suggested in this answer:

https://stackoverflow.com/a/15146334/3063835

It's not 100% clear from your question, but this is all assuming you want an actual "click" message to be sent to your form. If you just want to simulate a click event on a control in your form, you can always just call the click event handler when appropriate!

Community
  • 1
  • 1
Rowbear
  • 1,619
  • 12
  • 15