Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-08-26
14
Medium Priority
?
169 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 800 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

Technology Partners: 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!

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

610 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