Click to See Complete Forum and Search --> : Loading a Form By Name From Another project
Marlen
September 14th, 2005, 03:25 AM
Hi,
I have two projects in my VB.Net solution, I need to load a form found in project1 from project2 by passing the name of the form as a string variable. Any help?
jhammer
September 14th, 2005, 04:34 AM
If the two projects are Windows Applications, I suggest you add another Class Library project to the solution, which will have all common classes of the two applications. Add a reference to the class library from both applications.
That way you can open the form in both applications.
If I did not understand your question correctly, please tell.
Marlen
September 14th, 2005, 04:46 AM
the form that I want to load is found in a dll, the problem is loading it by "passing the name as string variable" from another project.
jhammer
September 14th, 2005, 06:22 AM
You can create instance of any object using Activator.CreateInstance method.
Look at MSDN.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.