I have the following code :
This call the second form
private void updateToolStripMenuItem_Click(object sender, EventArgs e) { Up
The best way to do so :
private void Form_Load(object sender, EventArgs e) { switch(funct()) { case 2: this.BeginInvoke(new MethodInvoker(this.Close)); break; case 3: this.BeginInvoke(new MethodInvoker(this.Close)); break; default: MessageBox.Show("Something"); } }