Im writing the UI for an application based on business objects(CSLA), in
the Winforms version of the UI i want to load a form given only the
string name of it, such as "frmCompany"
using reflection i can get an objecthandle of my form like so....
Private function LoadForm(ByVal FormName as string) as boolean
Try
Dim obj As System.Runtime.Remoting.ObjectHandle
obj = System.Activator.CreateInstance( _
Reflection.Assembly.GetExecutingAssembly.ToString, FormName)
Catch ex As Exception
MessageBox.Show(ex.ToString)
........
How do i now get the form reference?
And is this the most effective way to load my form from a string
identifier?
Thanks in advance
Guy