private void button4_Click(object sender, EventArgs e) { Login login = new Login(); login.ShowDialog(); if (Login.logincorrect == true) { AdminApp adminapp = new AdminApp(); adminapp.Show(); Login.logincorrect = false; } }