private void mnuMaterials_Click(object sender, EventArgs e) { if (frmMaterials == null) { frmMaterials = new frmDefaultImage(); frmMaterials.FormClosed += new FormClosedEventHandler(frmMaterials_FormClosed); frmMaterials.MdiParent = this; frmMaterials.Show(); } }
private void frmMaterials_FormClosed(object sender, FormClosedEventArgs e) { frmMaterials.Dispose(); frmMaterials = null; frmCompanySettings = new SettingPage(); frmCompanySettings.FormClosed += new FormClosedEventHandler(frmCompanySettings_FormClosed); frmCompanySettings.MdiParent = this; frmCompanySettings.Show(); }
private void frmLogin_FormClosed(object sender, FormClosedEventArgs e) { frmLogin.Dispose(); //this.Show(); frmMaterials = new frmDefaultImage(); frmMaterials.FormClosed += new FormClosedEventHandler(frmMaterials_FormClosed); frmMaterials.Show(); //if (!(this.ActiveMdiChild == null)) //{ // foreach (Form form in this.MdiChildren) // { // if ((form.Name == "Users")) // { // form.Activate(); // return; // } // } //} //Users home = new Users(); //home.MdiParent = this; //home.Show(); }