且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从其子窗体访问MDIContainer控件?

更新时间:2023-12-06 09:44:52

我想这会帮助你



 这个 .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[^]