如何从其子窗体访问MDIContainer控件? [英] How to access the MDIContainer control from its child form?
本文介绍了如何从其子窗体访问MDIContainer控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个小项目。我的项目Iam访问我的MDIContainer中的子窗体,如下面的方式
和Form_Main(MdiContainer)有控制工具Strip1
toolStrip1包含toolStripDropDownButton2
MDIContainer代码: -
Form_Child1 ChqReq = Form_Child1.GetForm(true,this);
ChqReq.FormBorderStyle = FormBorderStyle.None;
ChqReq.Dock = DockStyle.Fill;
ChqReq.Show();
因此控件专注于Form_Child1 ......
现在我试图改变Form_Main toolStripDropDownButton2.Text ....
有可能吗?
谢谢
解决方案
我想这会帮助你
这个 .parent.toolStripDropDownButton2.Text = bla bla bla
请读到这里
如何从孩子访问MDI父窗体的控制(ToolStripStatusLabel)表格 [ ^ ]
Hi,
Iam developing a small project. With my project Iam accessing the child form inside my MDIContainer like the below manner
And Form_Main (MdiContainer) is having the control toolStrip1
toolStrip1 contains toolStripDropDownButton2
MDIContainer code :-
Form_Child1 ChqReq = Form_Child1.GetForm(true, this); ChqReq.FormBorderStyle = FormBorderStyle.None; ChqReq.Dock = DockStyle.Fill; ChqReq.Show();
So that the control is focused to Form_Child1...
Now Iam trying to change the Form_Main toolStripDropDownButton2.Text....
Is it possible?
Thanks
解决方案
i think this will help you
this.parent.toolStripDropDownButton2.Text = "bla bla bla"
Please read here
How to access a control (ToolStripStatusLabel) of a MDI parent form from a child form[^]
这篇关于如何从其子窗体访问MDIContainer控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文