Пример #1
0
        public frmMain()
        {
            InitializeComponent();
            frmBorrow b = new frmBorrow();

            b.Show();
            b.MdiParent   = this;
            b.WindowState = FormWindowState.Maximized;
        }
Пример #2
0
        private void borrowToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool exist = false;

            foreach (Form b in this.MdiChildren)
            {
                if (b.Name == "frmBorrow")
                {
                    b.Activate();
                    exist = true;
                    break;
                }
            }
            if (!exist)
            {
                frmBorrow b = new frmBorrow();
                b.MdiParent = this;
                b.Show();
            }
        }