1
Answer

this.hide();

Ask a question

hi guys can some one help me out I have an application with two form on a first form's load event I have a condition where I check for something if it passes then I hide it and show the secong one but the issue is even if I hide it it still shows(ib if I do it on a btton click event it hides just fine )  below is my code

private void frmCreateDb_Load(object sender, EventArgs e)

{

frmMenu menu = new frmMenu();

try

{

if (!Boolean.Parse(Settings.Default.sFistTimeRun.ToString()))

{

this.Hide();

menu.Show();

}

else

{

menu = null;

}

}

catch(Exception ex)

{

MessageBox.Show(ex.Message);

}

}


Answers (1)