I am a user of c#, visual studio 2005.
I have a principal MDI Master Form that launch mdi childrens. I need to access from one of this childs to a method in Master Form.
How can I do this?
Must I use delegates?
Static methods? (if static, my problem is that I can call Master's method from child but this method isn't able to accessing form controls.)
Access from one of this childs to a method in Master Form
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Jan MontanoRank #1,295 · 1.3K reputationPosted Oct 10, 2007, 6:17 PM EDT
You could use Application.OpenForms[]
In the example below I have 2 Forms. One Mdiform (Form1) and one child.(Form2) And I created a public non-static method Form1.Test1() just for test purposes.
Form2.cs
private void button1_Click(object sender, EventArgs e)
{
Form1 form1 = (Form1)Application.OpenForms[0];
form1.Test1();
}