Beispiel #1
0
        private void btn_Write_Click(object sender, EventArgs e)
        {
            Frm_WriteName frm = new Frm_WriteName();

            frm.MdiParent     = staticMain.MainMDI;
            frm.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;// Forms.
            frm.Dock          = DockStyle.Fill;
            frm.TopMost       = true;
            frm.Show();

            //staticMain.MainMDI.CloseAllForm();
            //Frm_WriteMain frm = new Frm_WriteMain();
            //frm.MdiParent = staticMain.MainMDI;
            //frm.Dock = DockStyle.Fill;
            //frm.Show();
            //if (this.MdiParent.MdiChildren.Contains(frm) == true)
            //{
            //    frm.Show();
            //}
            //else
            //{

            //    frm.Activate();
            //}
            //foreach (Form childForm in this.MdiParent.MdiChildren)
            //{
            //    if (childForm.Name == frm.Name)
            //    {
            //        frm.Show();
            //    }
            //    childForm.Close();

            //}
        }
        private void button1_Click_1(object sender, EventArgs e)
        {
            //staticMain.MainMDI.CloseAllForm();

            Frm_WriteName frm = new Frm_WriteName();

            frm.MdiParent = staticMain.MainMDI;
            //frm.Dock = DockStyle.Top ;
            frm.Show();
        }
        private void button4_Click(object sender, EventArgs e)
        {
            staticMain.MainMDI.CloseAllForm();
            Frm_WriteName frm = new Frm_WriteName();

            frm.MdiParent     = staticMain.MainMDI;
            frm.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;// Forms.
            frm.Dock          = DockStyle.Fill;
            frm.TopMost       = true;
            frm.Show();
        }