refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
Go Back  Xtreme Visual Basic Talk > > > refering to a 2nd imported project, within the same solution?


Reply
 
Thread Tools Display Modes
  #1  
Old 01-21-2011, 06:00 PM
45minutes 45minutes is offline
Regular
 
Join Date: Jan 2011
Posts: 75
Default refering to a 2nd imported project, within the same solution?


Hi,

I Imported 2 programs that I made into one solution. I made a "BIG" main menu (new windows form), put two buttons. I code one button to open up the first project (that works fine). I code the other button to open the project I imported, however it says that the name is not declared. Am I doing something wrong?

here is my code for the "BIG" main menu:

Code:
Public Class Super_Main_Menu

    Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Main_Menu.Show()
    End Sub

    Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        "Original name of first project"."the project I imported"."window I want to show".show()
    End Sub

End Class

now only the "Original name of first project" appears to be not declared, if I delete "Original name of first project", then "the project I imported"is not declared and so forth. Note: These are not the exact names I called my forms. I'm just trying to explain it clearer. thank you.
Reply With Quote
  #2  
Old 02-05-2011, 03:25 PM
passel's Avatar
passelrefering to a 2nd imported project, within the same solution? passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,024
Default

A Solution can be used to gather files and projects together that are related in some way, for organizational purposes. A project is used to build an application. If you have two projects in a solution, you can build two applications. One project shouldn't know about the other projects in the solution.
If you want to combine two projects into one, then that is what you need to do. Copy the files from one project into the other, or create a new project and pull files from the two original projects into it.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #3  
Old 02-06-2011, 08:15 AM
snarfblam's Avatar
snarfblamrefering to a 2nd imported project, within the same solution? snarfblam is offline
Senior Contributor

Forum Leader
* Expert *
 
Join Date: Apr 2005
Location: USA
Posts: 896
Default

Alternatively, one project can reference another to access it's classes. Suppose you want project A to be able to access project B. In the solution explorer, right-click project A, and select "Add Reference." In the dialog that comes up, select the "Projects" tab and select project B.

Now code within project A can access classes in project B, but will require that project B's executable reside in the same directory (or be otherwise available). VS will copy project B's executable to project A's bin directory when you build or run.

If you want to treat the whole thing as a single application, follow passel's advice and put all the code in a single project.
__________________
C# _VB.NET _
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution? refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
 
refering to a 2nd imported project, within the same solution?
refering to a 2nd imported project, within the same solution?
 
-->