Solved

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

Posted on 2004-08-26
14
162 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
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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now