How do you simulate Mouse clicks in C# winforms applications?
I use the InvokeOnClick()
method. It takes two arguments: Control and EventArgs. If you need the EventArgs, then create an instance of it and pass it in, else use InvokeOnClick(controlToClick, null);
. You can use a variety of Mouse event related arguments that derive from EventArgs such as MouseEventArgs.