public void ShowPasswordChangeForm(LoginForm loginForm) { foreach (Form form in Application.OpenForms) { if (String.Compare(form.Name, "PasswordChangeForm") == 0) { form.Show(); return; } } passwordChangeForm = new PasswordChangeForm(loginForm); passwordChangeForm.Show(); }