private void btn_users_Click(object sender, EventArgs e) { bool b = false; foreach (Form f in Application.OpenForms) { if (f.Name == "frm_users") { b = true; } } if (!b) { frm_users userform = new frm_users(currentUser); userform.TopLevel = false; this.Controls.Add(userform); userform.Show(); } }
private void btn_users_Click(object sender, EventArgs e) { bool b = false; foreach (Form f in Application.OpenForms) { if (f.Name == "frm_users") { b = true; } } if (!b) { frm_users userform = new frm_users(); userform.currentUser = this.currentUser; userform.currentUID = this.currentUID; userform.currentUseraccess = this.currentUserAccess; toFront(userform); } }