Solved

NewBee: I have One Solution with Two Projects, How Do I access the Second Project?

Posted on 2004-08-26
14
167 Views
Last Modified: 2010-04-23
Greetings,

First let me apologize for asking this question, I know it has a simple answer but I am VERY new and need to ask the question anyway. ( I am 60 years young [no lie] and I am trying to learn this stuff on my own..)

I have created a VB.NET application that contains several forms with several controls on each form. I use this application (called 'DataInput')  to add data to a few Access databases. This all works and I have created a Deployment Solution as well.

I have started a second application (called 'DataManager') in a  different Folder. This application has a single form in it which I will use as a MDI parent. (isMDIContainer = True). I have added the 'DataInput' project (DataInput.vbproj) to the 'DataManager' Project by adding an "Existing Project" to the 'DataManager' Solution. I now have a Single Solution that contains Two Projects.

Now here is the embarrasing question. How to I get at the 'DataInput' Forms and Functions from within the 'DataManager' Code?

I guess what I need to know is how to Instantiate an instance of the 'DataInput' project so that the forms can be added as Child forms to the 'DataManager' Parent form.
0
Comment
Question by:rrbecker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 11906141
you can run each project by going and right click in the solution area and set that project to "set as a startup app"

Here is where I found a good example for a starting new in VB.Net
.....http://msdn.microsoft.com/vbasic/downloads/samples/101samples.aspx

Link for ASP programs...

http://msdn.microsoft.com/asp.net/downloads/kits/default.aspx 
 
0
 
LVL 5

Expert Comment

by:thenrich
ID: 11906240
to reference 1 project into another go tot he solution explorer under references  - there should be a tab to reference any project in your solution.
0
 
LVL 17

Accepted Solution

by:
AerosSaga earned 200 total points
ID: 11906490
copy the second project into the same folder as the first, add a reference in the ide.  Be sure you select true for copy locally.  VS will then copy the needed dll into the projects bin folder and you can initiate the class and create a new instance available across the application.  Very useful for modular class design.

Regards,

Aeros
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:rrbecker
ID: 11906687
Hi thenrich,

When I try your suggestion (which I think is what I need to have happen) I get the following error:

 "A reference to 'ApplicationSet' could not be added. An assemply must have a 'dll' extension in order to be referenced."

So, how do I get my 'ApplicationSetup' project into a dll?

Thanks in advance,

rrbecker
0
 
LVL 2

Author Comment

by:rrbecker
ID: 11906764
Hi Aeros,

".....copy the second project into the same folder as the first, add a reference in the ide.  Be sure you select true for copy locally....."

I don't think this is quite what I am after nor do I think it is the required approach. I have some examples of some Very large projects that expand multiple folders and are all brought together in a main folder. The MAIN project folder has a minimum amount of 'Files' in it but the MAIN Project. (Main.vbproj) has all of the other Projects Referenced in to the MAIN project.

My problem is that I Don't Know how it was done.

Thanks for your reply.

rrbecker
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11906774
if your writing a windows application then I'm sure they can be, I am an ASP.NET developer, so that is why I put that in.

Regards,

Aeros
0
 
LVL 2

Author Comment

by:rrbecker
ID: 11906844
Hi Aeros,

I'm sorry, did I ask this question under the wrong Heading?  If so how do I move this question to the Right Heading (VB.NET)


Thanks for your help

rrbecker
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11906864
Well you can code ASP.NET applications in VB.NET as well so this forum kinda gets jumbled.
0
 
LVL 2

Author Comment

by:rrbecker
ID: 11906947
Hi Aeros,

"....Well you can code ASP.NET applications in VB.NET as well so this forum kinda gets jumbled..."

Ok, Thanks for the info. Like I said, I'm a NewBEE...

rrbecker
0
 

Expert Comment

by:dubbs2003
ID: 11907996
In your DataManager.vb, if you want to create child instances use

Dim DataInput As New DataInput
DataInput.MdiParent = Me  'This links created child form to parent
DataInput.Show()
0
 
LVL 2

Author Comment

by:rrbecker
ID: 11908192
Hi dubbs2003,

That would work (and I already know how to do that) IF there was an intrinsic Reference to the 'DataInput' form, and there inlies my problem. If you refer back to my original description you will see:

 "....I have added the 'DataInput' project (DataInput.vbproj) to the 'DataManager' Project by adding an "Existing Project" to the 'DataManager' Solution. ...."

While this process does add the DataInput project to the DataManager I can't figure out why there is not a intrinsic Reference created so that I can do those things represented in your suggestion.

In other words if I add your suggested to code I will get the following error:

"Type 'DataInput' is not defined."

This is the problem that I an trying to correct.

Thanks for your response.

rrbecker
0
 
LVL 2

Author Comment

by:rrbecker
ID: 11991878
Hi All,

I still haven't found the answer to this question/problem. Do I need to increase the Point Value? Or is it just one of those things that is just not doable?

rrbecker
0
 
LVL 2

Author Comment

by:rrbecker
ID: 12079944
I going to award the points to AerosSaga because some of my development requirements have changed and I am now working with both ASP.NET and VB.NET.

I still don't have the full answer but Aeros is answering the ASP part of my new requirements.

Thanks Aeros,

rrbecker
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12079962
Your very welcome rrbecker, hows it goin?
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
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 video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

726 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