I am writing an MDI application that dynamically builds a menu structure from a database. In order to do this, I need to late bind the child forms based on the menu information in the database. This is what I have so far.
Dim frmTemp as New Object
Dim asTest as System.Reflection.Assembly
asTest = System.Reflection.Assembly.Load("TestMDIFormDLL"
frmTemp = Activator.CreateInstance(a.GetType("frmTestMDI"
)
frmTemp.mdiparent = Me
frmTemp.Show()
The assembly 'TestMDIFormDLL' is loaded, and frmTestMDI is a public class in that assembly, but when I try to do the GetType I get the following error:
An unhandled exception of Type 'System.ArgumentNullException' occurred in mscorlib.dll
Additional information: Value cannot be null
Any help on this would be appreciated.
Dim frmTemp as New Object
Dim asTest as System.Reflection.Assembly
asTest = System.Reflection.Assembly.Load("TestMDIFormDLL"
frmTemp = Activator.CreateInstance(a.GetType("frmTestMDI"
frmTemp.mdiparent = Me
frmTemp.Show()
The assembly 'TestMDIFormDLL' is loaded, and frmTestMDI is a public class in that assembly, but when I try to do the GetType I get the following error:
An unhandled exception of Type 'System.ArgumentNullException' occurred in mscorlib.dll
Additional information: Value cannot be null
Any help on this would be appreciated.