Comining more than one Windows project in one solution


I want to combine different Windows projects (VB.NET 2003) in on solution. How can I make reference to Windowsapplication from another WindowsApplication?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hey -- i wondered about this one for awhile after downloading one solution after another (from codeproject et al) with multiple projects.

then i found it.

open your solution.
File > Add Project > New Project (or Existing Project)

heh ... it was there the whole time.  No more need for my laptop to have 3-5+ visual studio's open! ... *eyes the taskbar* ... yet i have 3 of them open now.  oh well :P
f_asmaaAuthor Commented:
Yes, Iknow this. But how can you refer to WindowsProject2 from WindowsProject1?
It is impossible. Referenced project must be class library and not Windows application. Windows doesn't allow dynamic linking between two executable files.
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

If you have some classes in WindowsProject2 which you want to make available from WindowsProject1, create new Class Library project, move these classes to it and add reference to this library to both Windows projects.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Right.  So if you have a main project and abunchof Controls or something that compile down to libraries ... you can add those projects and add references to their dll's from your main project.

Or, alternatively, if you have abunchof projects ... a client project, a server project (both compile to windows applications), and abunchof libraries ... you can work with them all within the same solution and built them / add references to one another ... if you want something to start when you hit F5, goto the solution's properties and > Single Startup Project ... and select the project you want to run.
f_asmaaAuthor Commented:
Will public variables in one project be seen by other projects in the same solution?
No, you need an instance of the class to access it's variable (unless they are 'Shared'), but in any case, you will first need a reference to the project, which, as has already been mentioned can only be to a .dll file.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.