P
Paul Craig
Hi,
I am currently able to open forms given a string variable using the
following code:
Dim strForm As String = "Form1"
Dim theForm As Form
theForm = AppDomain.CurrentDomain.CreateInstanceAndUnwrap _
(Me.GetType.Assembly.GetName.Name, System.String.Concat
_
(Me.GetType.Assembly.GetName.Name, ".", strForm))
theForm.Show()
My problem is that I want to also be able to open forms that have
constructors that require a parameter eg. Form1(217).
When I try changing the strForm variable to "Form1(217)", i get an
error because it appears to be looking for a form actually called
Form1(217).
Any help is greatly appreciated, cheers.
Paul
I am currently able to open forms given a string variable using the
following code:
Dim strForm As String = "Form1"
Dim theForm As Form
theForm = AppDomain.CurrentDomain.CreateInstanceAndUnwrap _
(Me.GetType.Assembly.GetName.Name, System.String.Concat
_
(Me.GetType.Assembly.GetName.Name, ".", strForm))
theForm.Show()
My problem is that I want to also be able to open forms that have
constructors that require a parameter eg. Form1(217).
When I try changing the strForm variable to "Form1(217)", i get an
error because it appears to be looking for a form actually called
Form1(217).
Any help is greatly appreciated, cheers.
Paul