rocky050371
asked on
Reflection and Forms
I am using the following code to create a form based on a key value from a toolbar, is this the correct way of doing it. I have stitched it together from various exmaples. My concern starts with the first line is this right
Dim asm As Assembly = Assembly.GetExecutingAssem bly
Dim formObj As Type = asm.GetType("Aquarius." & e.Item.Key)
Dim formActivator As Object = Activator.CreateInstance(f ormObj)
frm = DirectCast(formActivator, Form)
If frm.Name.Substring(0, 4) = "View" Then
frm.MdiParent = Me
End If
frm.Show()
Dim asm As Assembly = Assembly.GetExecutingAssem
Dim formObj As Type = asm.GetType("Aquarius." & e.Item.Key)
Dim formActivator As Object = Activator.CreateInstance(f
frm = DirectCast(formActivator, Form)
If frm.Name.Substring(0, 4) = "View" Then
frm.MdiParent = Me
End If
frm.Show()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.