Groups | Blog | Home
all groups > dotnet faqs > october 2005 >

dotnet faqs : .dll and forms



Ollie Riches
10/26/2005 12:00:00 AM
why don't you pass the form type as a string and use reflection to create
the instance of the form.

HTH

Ollie Riches

[quoted text, click to view]

Jaime Lucci
10/26/2005 12:00:00 AM
Thanks a lot.


[quoted text, click to view]

Jaime Lucci
10/26/2005 9:22:26 AM
Hi, how've you been?

I'm trying to do a .dll that would be able to manage forms from an
independient project. The dll has a method that receive a parameter which is
the form I want to manage. The problem is that I have to pass the instancied
form as parameter instead of its name. When I have to manage many forms, it
will be necessary to instance all forms, and it minus the performance of my
project.

What I do is:

myclass.mymethod(new form1).
myclass.mymethod(new form2).
myclass.mymethod(new form3).
....
myclass.mymethod(new formN).

How can I do to prevent this and pass as a parameter only the form name
instead of the instanced form? If I pass the class name I have an error.

I hope you understand my problem and my english.

Thanks.

Jaime Lucci
jaimelucci@hotmail.com
Salta, Argentina

AddThis Social Bookmark Button