Solved

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

Posted on 2004-08-26
14
164 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need a starter for ETL protocol? 4 57
Creating a route in asp.net webforms 2 28
Error handling in asp.net site 5 28
VB.NET - Error - Object not set in Module 4 33
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 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