//To launcher form private void button1_Click(object sender, EventArgs e) { FrmLauncher launcher = new FrmLauncher(); launcher.Show(); this.Close(); }
private void btnStart_Click(object sender, EventArgs e) { if ((userTrue == true) && (passTrue == true)) { while (loadingBar.Value != 100) { loadingBar.Value++; Thread.Sleep(4); } FrmQ1 frmGame = new FrmQ1(); frmGame.Show(); this.Hide(); FrmLauncher frmLauncher = new FrmLauncher(); if (ExitGame == true) { frmLauncher.Show(); } else if (CloseToWindows == true) { frmLauncher.Close(); } loadingBar.Value = 0; } else { MessageBox.Show("Something went wrong! Please try again!"); } }