Force click on an object.

  • Thread starter Thread starter Mr. X.
  • Start date Start date
Am 05.03.2010 23:31, schrieb Mr. X.:
How can I force click on an object (such as button, etc. ) ?

In Windows Forms, buttons provide a 'PerformClick' method (see
documentation).

If you want to simulate clicking as if it was done by the computer's
mouse, you may want to take a look at the 'SendInput' and 'mouse_event'
Win32 functions, which can be accessed via p/invoke.
 
Dim sender As Object

Dim e As EventArgs

btnYourButton_Click(sender,e)

will do the trick
 
Back
Top