|
-
Sep 17th, 2002, 06:28 AM
#1
Thread Starter
New Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|