bakerOSU333
asked on
Why won't PerformClick() work?
I'm trying to call a form and have it automatically click a button, but for some reason PerformClick won't work... I've attached the form's code below.
public partial class frmTempDet : Form
{
public frmTempDet(string monthYear, string cycle)
{
InitializeComponent();
txtMonthYear.Text = monthYear;
cbCycle.Text = cycle;
btnTempDet.PerformClick();
}
private void btnTempDet_Click(object sender, EventArgs e)
{
MessageBox.Show("Success");
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.