private void button1_Click(object sender, EventArgs e) { //XtraForm activeChild = (XtraForm)this.ActiveMdiChild; //if (activeChild != null) //{ // //string activeformname = ""; // //activeformname = activeChild.Name; // //int a = activeChild.Controls.Count; // //XtraForm frm = Activator.CreateInstance(typ) // //frmCustomers ccc = new frmCustomers(); // //foreach (Control c in ccc.Controls) // // { // // C1TrueDBGrid grd = c as C1TrueDBGrid; // // if (grd != null) // // { // // MessageBox.Show("db present on form"); // // } // // grd = null; // // // c = null; // // break; // // //else // // //{ // // // MessageBox.Show("db not present on form"); // // //} // // } // //ccc.Dispose(); //} //this.SendToBack(); frmResume frm = new frmResume(); // frm.BringToFront(); frm.Username.Text = lblUsername.Caption; //foreach (Form f in Application.OpenForms) //{ // if (f.Name != "frmResume" && f.Name != "frmMain") // { // f.Visible = false; // } //} frm.ShowDialog(); }
private void btnLock_Click(object sender, EventArgs e) { FrmMain1 objMain = Program.Func(); frmResume frm = new frmResume(); frm.Username.Text = GlobalVar.g_UserName; objMain.dockHeaderMenu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; objMain.dockMainMenu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; foreach (Form f in Application.OpenForms) { Forms.Add(f); } for (int i = 0; i <= Forms.Count - 1; i++) { if (Forms[i].Name != "FrmMain1") { Forms[i].Visible = false; } } frm.ShowDialog(); }