0) To imulate a button click in the app containing the button, use the
PeformClick
method.
1) If it's in another app, you need to have the window handle of the window that has the button in it, and then use either
PostMessage
or
SendMessage
(I would use Postmessage myself). Go to
pInvoke.net[
^] to get the proper prototypes for these API methods.