I have a MDIform application, where a form named MainForm is set to parent. Every time I open a new form I’m closing the others and I do it with custom method that gets 3 arguments one of which is object representing the MDIparent. Mostly I open forms from my MainForm which is also a MDIparent but I have this situation where I have to open a child form form another child form. Let’s say that if I call my method for opening a new form like :
NewForm newForm = getMyForm(this, arg2, arg3)
when I’m in the MainForm which is also a parent it’s easy. But how to call my method or how to pass the object which is my MDIparent when I’m calling from other child form?
You can use Form.MdiParent property which will give you the
MDI Parentfor the current form.