VB.Net -- Can I include a form in another folder rather than copy it?

I often find it useful to use the same code, including forms, in multiple projects.

But in Visual Basic .Net 2003 & 2005, when I add an existing form to a project, Visual Studio copies the form into my project folder.  That leaves me with 2 places to maintain that code -- which is not acceptable.

I had thought this was a 2003 problem & maybe 2005 would fix it, but it hasn't.  I'm looking at upgrading to 2008, but have little hope of it being solved.

Is there a way to get VB.Net to include the form that's in another folder without copying?

Thanks.
LVL 32
Daniel WilsonAsked:
Who is Participating?
 
DhaestConnect With a Mentor Commented:
You can create a project, containing all the forms, modules, ... that are common.
In your project where you want to use this forms,... you can reference to the common-project.
0
 
Daniel WilsonAuthor Commented:
but then I have to distribute all the common ones to all customers

Suppose my needs are:
Proj1
  ModA
  ModB
  FormC
  formD

Proj2
  ModA
  FormB
  FormC
  FormE

Proj3
  ModB
  FormD
  FormC


That would mean nearly all the modules & forms would go into the Common DLL which I must distribute with each Proj1-3.

That would work ... but I was hoping for a better way.

Thanks.
0
 
DhaestCommented:
>> That would mean nearly all the modules & forms would go into the Common DLL which I must distribute with each Proj1-3.

That's right, but the dll's are automatically distributed together with your setup. If won't be that big to distribute.
0
 
Daniel WilsonAuthor Commented:
I'm not worried about distributed size.  I don't like passing out a lot more functionality than the customer has paid for -- available for them to call w/ a .Net form that a high school kid can put together in  hours.

Anyway, your answer is probably the right one, given what MS has created for us.  In C++ and even VB6 I'm accustomed to including what I need across folders.  I don't know why MS has taken that ability away in VB.Net.

Thanks for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.