Creating forms Dynamically
Hi
Can anyone tell me if it is possible to create a form dynamically in .NET by passing a classname as a parameter
for example, image the following code works for a second
private Function NewForm(frmName as string) as Form
NewForm = CreateObject(frmName)
end Function
I would invoke it like this:
myForm = NewForm("Form2")
Now this won't work since CreateObject only works on COM objects - so, is there something equivalent I could do to create this form in the function if I only know the className.
Remember, I can't use the 'New' keyword as New expects you to supply an explicit classname (I only have the classname as a string parameter)
any help would be greatly appreciated
Cheers
Mat