?
Solved

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

Posted on 2007-10-19
4
Medium Priority
?
156 Views
Last Modified: 2013-11-26
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.
0
Comment
Question by:Daniel Wilson
  • 2
  • 2
4 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 20107737
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
 
LVL 32

Author Comment

by:Daniel Wilson
ID: 20107857
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
 
LVL 53

Expert Comment

by:Dhaest
ID: 20128864
>> 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
 
LVL 32

Author Comment

by:Daniel Wilson
ID: 20130370
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question