private void ShowFormAccount() { #region Show Form Account foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(FormAccount)) //<<FormName { form.WindowState = FormWindowState.Normal; form.BringToFront(); form.Focus(); return; } } FormAccount formAccount = new FormAccount { MdiParent = this }; formAccount.Show(); formAccount.Activate(); formAccount.Focus(); #endregion Show Form Account }
public FormAccount() { InitializeComponent(); Forms = this; }