Click here to Skip to main content
13,046,375 members (67,245 online)
Rate this:
Please Sign up or sign in to vote.
See more:
HI Guyz,

i have a form reference in dll and i want to invoke the form through its dll using reflection. My Question is, Is this possible? and if yes how ?
Posted 31-Jul-12 3:34am
Updated 31-Jul-12 3:42am
xavior885 1-Aug-12 3:00am
I was new to this and your solution helped me alot. thank you very much

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Of course you can. Start here:[^].

But be aware that you need to add an extra interface (formal or not) to have communication between instantiating class and instantiated form - the argument passed to the constructor in the sample is one aspect of this.

You can use Assambly.GetTypes[^] to list all types and find the form descendants.
Sergey Alexandrovich Kryukov 31-Jul-12 12:26pm
Of course, a 5.
Zoltán Zörgő 31-Jul-12 12:52pm
Thany you
Sergey Alexandrovich Kryukov 31-Jul-12 12:55pm
You recently provided a really good answer on plug-in unloading, please see my comment.
Zoltán Zörgő 31-Jul-12 12:58pm
Yes that would be a good and really robust approach also in this case. But might be not needed if only loading them is required, and the dynamism of plugins is not.
Sergey Alexandrovich Kryukov 31-Jul-12 13:42pm
Of course.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 31 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100