S
Shayne H
I was using the following code to create a form from its class name. It was
working then at some point I must have broken it, and now have no idea why
it will not work. The CreateInstance method returns <Nothing>
Class MyClass
Function OpenForm(ByVal FormName As String) As Form
Dim obj As Object
obj = Me.GetType.Assembly.CreateInstance(FormName, False)
Return CType(obj,Form)
End Function
End Class
working then at some point I must have broken it, and now have no idea why
it will not work. The CreateInstance method returns <Nothing>
Class MyClass
Function OpenForm(ByVal FormName As String) As Form
Dim obj As Object
obj = Me.GetType.Assembly.CreateInstance(FormName, False)
Return CType(obj,Form)
End Function
End Class