Just want to click accept button inside source without clicking it manually on form
And hide the form to the user
Form will come with accept=ok and gonna be hi
You can use PerformClick Method:
button1.PerformClick();
If you are talking about clicking, most probably you have event handler, which simply you want to invoke. I suppose it is OnAcceptClick
.
So to achieve your goal simply invoke the method just like any other:
OnAcceptClick(null, null);
As first argument, you can pass reference to your accept button and if you need event arguments, you can create new instance of it as needed.