public void ShowManagerMainForm(UserAccount user, LoginForm loginForm) { foreach (Form form in Application.OpenForms) { if (String.Compare(form.Name, "ManagerMain") == 0) { form.Show(); return; } } managerMainForm = new ManagerMain(user, loginForm); managerMainForm.Show(); }