Exemple #1
0
        private void barButtonItemTest_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FormGenConfigClass frm = new FormGenConfigClass();
                frm.MdiParent = this;

                frm.Show();


                Form1 frm2 = new Form1();
                frm2.MdiParent = this;
                frm2.Show();


                Form2 frm22 = new Form2();
                if (frm22.IsMdiContainer)
                {
                    frm22.IsMdiContainer = false;
                    frm22.MdiParent      = this;
                }
                else
                {
                    frm22.MdiParent = this;
                }

                frm22.StartPosition = FormStartPosition.CenterScreen;
                frm22.Show();
                frm22.Activate();

                UserControl1 cl = new UserControl1();

                Form1 frm211 = new Form1();

                frm211.Controls.Add(cl);
                frm211.IsMdiContainer = false;
                frm211.MdiParent      = this;
                frm211.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #2
0
        private void barButtonItemTest_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                FormGenConfigClass frm = new FormGenConfigClass();
                frm.MdiParent = this;

                frm.Show();

                Form1 frm2 = new Form1();
                frm2.MdiParent = this;
                frm2.Show();

                Form2 frm22 = new Form2();
                if (frm22.IsMdiContainer)
                {
                    frm22.IsMdiContainer = false;
                    frm22.MdiParent = this;
                }
                else
                {
                    frm22.MdiParent = this;
                }

                frm22.StartPosition = FormStartPosition.CenterScreen;
                frm22.Show();
                frm22.Activate();

                UserControl1 cl = new UserControl1();

                Form1 frm211 = new Form1();

                frm211.Controls.Add(cl);
                frm211.IsMdiContainer = false;
                frm211.MdiParent = this;
                frm211.Show();

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }