I have the following code :
This call the second form
private void updateToolStripMenuItem_Click(object sender, EventArgs e) { Up
try this
private void Form_Load(object sender, EventArgs e) { switch(funct()) { case 2: this.Close(); break; case 3: this.Close(); break; default: MessageBox.Show("Something"); } }