Perhaps this will assist you.
Sub ShowForm(ByVal FormName As String)
Dim ProjectName As String =
Reflection.Assembly.GetExecutingAssembly.GetName.N ame
Try
Dim FormType As Type = Type.GetType(ProjectName & "." & FormName)
Dim frmObject As Object = Activator.CreateInstance(FormType)
DirectCast(frmObject, Form).StartPosition =
FormStartPosition.CenterParent
DirectCast(frmObject, Form).ShowDialog()
Catch ex As Exception
Console.WriteLine("Oooops")
Console.WriteLine(ex.Message)
End Try
End Sub
"jeff" <jhersey at allnorth dottt comwrote in message
news:eP**************@TK2MSFTNGP06.phx.gbl...
>
I would like to do the following ...
Dim lType as String
lType = "frmReport100"
Dim lFrm as lTtype
lFrm.ShowDialog
basically, I want to be able to create a form of type 'StringValue' ... i
want to use a string value to define the type of form to open.
Can I do this, and how would it be accomplished.
Thanks
Jeff
DoI need to loop through all the forms in the application ?