Exemplo n.º 1
0
        private void addBooksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            pnlMain.Hide();
            frmAddBooks addBooksForm = new frmAddBooks();

            addBooksForm.MdiParent = this;
            addBooksForm.Show();
        }
Exemplo n.º 2
0
        private void toolAddBooks_Click(object sender, EventArgs e)
        {
            pnlMain.Hide();
            Form        activeChild = this.ActiveMdiChild;
            frmAddBooks bookAddForm = new frmAddBooks();

            if (activeChild == null)
            {
                bookAddForm.Show();
                bookAddForm.MdiParent = this;
            }
            else
            {
                activeChild.Close();
                bookAddForm.Show();
                bookAddForm.MdiParent = this;
            }
        }