|I'm trying to use reflection open a mdi child. The catch is I'm using a helper class to do it.|
The menu on the mdi parent passes the full child name to the helper class. I can get it to bring the form, just not as an mdi child. My mdi parent is set as an mdiparent.
//callimng helper class with child name
public static void openMDI(string mdiName)
//Assembly myAssembly = Assembly.GetExecutingAssembly();
Type formType = Type.GetType(mdiName);
Form sf = System.Activator.CreateInstance(formType) as Form;
Form1 form1 = new Form1();
if (sf == null || sf.IsDisposed == true)
sf = new Form();
sf.MdiParent = form1;
my checks all show false so it never creates the first one in the mdi container.