OK, that helps understand your goal. You should probably have a look at
this link:
http://msdn.microsoft.com/en-us/library/23x5fk78.aspx. It gives
an overview of multiproject solutions.
The way I see it, you could have the project for the main application, and
four class libraries, one for each of the product groups. Others might
break up the libraries at the sub-product level, giving 20 libraries. There
is really no right or wrong answer here other than the items (forms,
classes, modules) form a logical grouping if they are in the same dll.
I believe you currently have a single project in your solution. To add a
product group library, select "File" then "New Project". For the project
type, select "Class Library". The name can be anything that signifies to
you that it pertains to a particular product group. Before clicking "OK",
make sure that the choice for "Solution" in the dropdown says "Add to
Solution".
Now you can move some of the forms, classes and modules out of the main
project to your dll project. It is likely you will need to add
System.Windows.Forms as a reference to your dll project as it is not added
by default.
When you move your forms and such out of your main project, you should see
errors about missing or undefined types. Those should be fixed by adding a
reference in your main project to the class library project. On the "Add
Reference" dialog, you will see a tab called "Projects" where you can point
to the new project.
The last step is that you will need to add an imports statement at the top
for the namespace from your new library so that the new namespace is
resolved.
Then you would do these steps for each new library you want to create.
Of course, make sure you back up your current solution folder so you can
always get back to the current way you have things!
Hope this helps.
"22Pom" <22***@discussions.microsoft.comwrote in message
news:B9**********************************@microsof t.com...
Hi Family Tree Mike,
Thank you for your responses and I'll try to answer you correctly.
I have several Modules and Classes that have common code used by other
parts
of the program and more can be done in this area, I'm sure.
My program consists of 4 main product groups each of which has 5 sub
products and as you proceed the screen is closed off. In addition to
these I
have forms that open a PDF style catalogue for each product.
Now each product has an entry screen where the user places their
requirements and after clicking to proceed comes back with various
selections. From this list the user closes this off and moves forward to
the
next screen.
This new screen allows for Printing the data or moving onto a dimensional
data screen, which also has a printing area. Some of these screens are
common, but it still increases the overall number of Forms, etc. Each
screen
has buttons to allow Exit the program or Return to a previous screen, each
time the screen is closed off and the new one opened.
All of these come under the main programs name. So I start a new project
and
just keep adding forms etc to the project. This, I beleive, is where my
problem lies and I don't know how to create smaller blocks and have them
linked to the main.
Best Rgds
"Family Tree Mike" wrote:
>Are you trying to learn how to divide a single project solution (exe)
into a
multi-project solution with one or more executable projects and one or
more
dll projects?
Alternatively, are you trying to learn how to create a multi-document
interface (MDI) application?
Sorry, I could not figure this out from your post.