How do i click a button on foam load using C#?
My button is called: btnFacebookLogin
I have tried this following:
private void Form1_Shown(Object sender, EventArgs e)
{
btnFacebookLogin.PerformClick();
}
I am using WinForms C# .NET 4
Be sure to link your handler after InitializeComponent() and to Load event
public Form1()
{
InitializeComponent();
Load += Form1_Shown;
}
private void Form1_Shown(Object sender, EventArgs e)
{
btnFacebookLogin.PerformClick();
}