我有两种形式(Mdi父母是形式1,Mdi儿童形式2)。我如何将儿童Mdi的价值传递给父母Mdi? [英] I Have Two Forms (Mdi parent is form 1 and Mdi Child form 2 ) .How Can I Pass The Values From Child Mdi to Parent Mdi ?

查看:95
本文介绍了我有两种形式(Mdi父母是形式1,Mdi儿童形式2)。我如何将儿童Mdi的价值传递给父母Mdi?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I Create Mdi Parent form and I Call Mdi parent Inside of Mdi Child Form at i give some String input on Child Form.How Can i Pass String Values Child to Parent Form. I need Pass Only Values But Not Parent Form Load Event.

//Parent MAIN FORM
        private void othersToolStripMenuItem_Click(object sender, EventArgs e)
        {
          
            OthersFrm other = new OthersFrm();
            other.MdiParent = this;
            other.StartPosition = FormStartPosition.Manual;
           // other.Size = this.ClientSize;
            other.Location = new System.Drawing.Point(134, 52);
            //other.Size = new System.Drawing.Size(784, 529);
            other.Show();
        }

//Child OTHERS Form

        private void btnsave_Click(object sender, EventArgs e)
        {
            //objDO.proc = textBox9.Text;
            objDO.compan = txtFCdesc.Text;
            this.Hide();
            MAIN ma = new MAIN();
            // ma.MdiParent = this;
            ma.Show();
        }

推荐答案

请看这里:在两种形式之间传递信息,第2部分:儿童到父母 [ ^ ]


这篇关于我有两种形式(Mdi父母是形式1,Mdi儿童形式2)。我如何将儿童Mdi的价值传递给父母Mdi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆