Пример #1
0
        public MDITabbed()
        {
            
            InitializeComponent();

            DockPanel dockPanel = new DockPanel();
            dockPanel.Dock = DockStyle.Fill;
            dockPanel.BackColor = Color.Beige;
            Controls.Add(dockPanel);
            //dockPanel.AllowEndUserNestedDocking = false;
            dockPanel.AllowEndUserDocking = false;
            dockPanel.BringToFront();

            Form1 form = new Form1();
            //form.AllowEndUserDocking = false;
            //form.WindowState = FormWindowState.Maximized;
            form.MinimizeBox = false;
            form.Show(dockPanel);

            form3 = new Form1();
            form3.Text = "Form 3";
            //form.AllowEndUserDocking = false;
            //form.WindowState = FormWindowState.Maximized;
            form3.MinimizeBox = false;
            form3.Show(dockPanel);
            form3.Select();


            frmMed = new frmMedicine();
            frmMed.Text = "Medicine";
            //form.AllowEndUserDocking = false;
            //form.WindowState = FormWindowState.Maximized;
            frmMed.MinimizeBox = false;
            frmMed.Show(dockPanel);
            frmMed.Select();

            frmFig = new frmFigure();
            frmFig.Text = "Figure";
            //form.AllowEndUserDocking = false;
            //form.WindowState = FormWindowState.Maximized;
            frmFig.MinimizeBox = false;
            frmFig.Show(dockPanel);
            frmFig.Select();

            
            Form1 form2 = new Form1(); ;
            form2.ShowHint = DockState.DockLeft;
            form2.AllowEndUserDocking = false;
            form2.CloseButton = false;
            form2.IsFloat = false;
            form2.CloseButtonVisible = false;
            form2.Show(dockPanel);
            dockPanel.Select();
            //form2.Select();
            //MessageBox.Show(dockPanel.Panes.Count.ToString());
        }