示例#1
0
        /**
         * @brief   Form1_Load
         * @param[in]   object      sender
         * @param[in]   EventArgs   e
         * @return      子Form を生成
         */
        private void Form1_Load(object sender, EventArgs e)
        {
            childFormTp1_1 = new ChildFormType1();
            childFormTp1_1.MdiParent = this;
            childFormTp1_1.Name = "ChildForm1";
            childFormTp1_1.Text = "ChildForm1";
            // 子FormでのEvent発生時、現在クラスのMethod callされるように設定
            childFormTp1_1.MyEvent += new ChildFormType1.MyEventHandler(CallBackFromChild);
            childFormTp1_1.Show();

            childFormTp1_2 = new ChildFormType1();
            childFormTp1_2.MdiParent = this;
            childFormTp1_2.Name = "ChildForm2";
            childFormTp1_2.Text = "ChildForm2";
            childFormTp1_2.MyEvent += new ChildFormType1.MyEventHandler(CallBackFromChild);
            childFormTp1_2.Show();

            childControlForm = new ChildControlForm();
            childControlForm.MdiParent = this;
            childControlForm.Name = "ControlForm";
            childControlForm.Show();
        }
示例#2
0
        ChildControlForm childControlForm;  // 子Form制御子Form

        /**
         * @brief   Form1_Load
         * @param[in]   object      sender
         * @param[in]   EventArgs   e
         * @return      子Form を生成
         */
        private void Form1_Load(object sender, EventArgs e)
        {
            childFormTp1_1           = new ChildFormType1();
            childFormTp1_1.MdiParent = this;
            childFormTp1_1.Name      = "ChildForm1";
            childFormTp1_1.Text      = "ChildForm1";
            // 子FormでのEvent発生時、現在クラスのMethod callされるように設定
            childFormTp1_1.MyEvent += new ChildFormType1.MyEventHandler(CallBackFromChild);
            childFormTp1_1.Show();

            childFormTp1_2           = new ChildFormType1();
            childFormTp1_2.MdiParent = this;
            childFormTp1_2.Name      = "ChildForm2";
            childFormTp1_2.Text      = "ChildForm2";
            childFormTp1_2.MyEvent  += new ChildFormType1.MyEventHandler(CallBackFromChild);
            childFormTp1_2.Show();

            childControlForm           = new ChildControlForm();
            childControlForm.MdiParent = this;
            childControlForm.Name      = "ControlForm";
            childControlForm.Show();
        }