Example #1
0
        private void panel1_Click(object sender, EventArgs e)
        {
            //Bring To Front (Child Form)
            //Nikko Melgar
            foreach (Form form in Application.OpenForms)
            {
                if (form.GetType() == typeof(MembershipMain))
                {
                    form.Activate();
                    return;
                }
            }

            MembershipMain frm  = new MembershipMain();
            MainForm       main = new MainForm();

            frm.Show();
            frm.MdiParent = main;
        }
        private void button2_Click_1(object sender, EventArgs e)
        {
            //Hide Panel
            panelMembership.Visible = false;

            //controls
            foreach (Form form in Application.OpenForms)
            {
                if (form.GetType() == typeof(MembershipMain))
                {
                    form.Activate();
                    return;
                }
            }

            MembershipMain membership = new MembershipMain();

            membership.Show();
            membership.MdiParent = this;
        }