private void btn_Write_Click(object sender, EventArgs e) { staticMain.MainMDI.CloseAllForm(); Frm_Main frm = new Frm_Main(); frm.MdiParent = staticMain.MainMDI; frm.Dock = DockStyle.Fill; frm.Show(); //if (this.MdiParent.MdiChildren.Contains(frm) == true) //{ // frm.Show(); //} //else //{ //} //foreach (Form childForm in this.MdiParent.MdiChildren) //{ // childForm.Close(); //} //Frm_Main frm = new Frm_Main(); //frm.MdiParent = this.MdiParent; //frm.ShowDialog(); //this.Close(); }
private void btn_Write_Click(object sender, EventArgs e) { Frm_Main frm = new Frm_Main(); frm.ShowDialog(); this.Hide(); }
private void button1_Click_1(object sender, EventArgs e) { staticMain.MainMDI.CloseAllForm(); Frm_Main frm = new Frm_Main(); frm.MdiParent = staticMain.MainMDI; frm.Dock = DockStyle.Fill; frm.Show(); }
private void MDIParent1_Load(object sender, EventArgs e) { Frm_Main frm = new Frm_Main(); frm.MdiParent = this; frm.Dock = DockStyle.Fill; //frm.WindowState = FormWindowState.Maximized; //frm.FormBorderStyle = FormBorderStyle.None; frm.Show(); }
private void btn_Write_Click(object sender, EventArgs e) { staticMain.MainMDI.CloseAllForm(); Frm_Main frm = new Frm_Main(); frm.MdiParent = staticMain.MainMDI; frm.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;// Forms. frm.Dock = DockStyle.Fill; frm.TopMost = true; frm.Show(); }