Ejemplo n.º 1
0
        //Just hide first layout, by hiding group box, then pop form2 and assign to its closing event a function
        private void PopForm2()
        {
            //Test all controls
            box2.Hide();

            EmployeeForm form2 = new EmployeeForm();

            form2.Location = new Point(100, 100);
            form2.BringToFront();

            form2.Show();

            //Assign function to event leave form
            form2.FormClosed += new FormClosedEventHandler(UpdateMenu_Form2Leave);

            //Disable menu items on this, form1
            menuItem1.Enabled = false;
            menuItem2.Enabled = false;
            //menuItem3.Enabled = false;
        }
Ejemplo n.º 2
0
        //Just hide first layout, by hiding group box, then pop form2 and assign to its closing event a function
        private void PopForm2()
        {
            //Test all controls
            box2.Hide();

            EmployeeForm form2 = new EmployeeForm();
            form2.Location = new Point(100, 100);
            form2.BringToFront();

            form2.Show();

            //Assign function to event leave form
            form2.FormClosed += new FormClosedEventHandler(UpdateMenu_Form2Leave);

            //Disable menu items on this, form1
            menuItem1.Enabled = false;
            menuItem2.Enabled = false;
            //menuItem3.Enabled = false;
        }