C# School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a C# Expert!

Join 307,109 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 2,008 people online right now. Registration is fast and FREE... Join Now!




How do i merge two C# projects and run a form from one of them in the

 

How do i merge two C# projects and run a form from one of them in the , Step by step needed very new still learning :)

Mattlav

30 Jun, 2009 - 12:47 AM
Post #1

New D.I.C Head
*

Joined: 21 Dec, 2008
Posts: 8


My Contributions
Hey,

Im trying to run two C# projects (merge together) and then from the click of a button open up a form from the other project if that made sense.. so for example i have project 1 and project 2 i want to merge them together and then say in project one create a button that opens up a windows form that has been created in project 2?

Sorry im quite a newbie with all this smile.gif

Thanks,

Mattlav smile.gif

User is offlineProfile CardPM
+Quote Post


Bocard

RE: How Do I Merge Two C# Projects And Run A Form From One Of Them In The

30 Jun, 2009 - 06:00 AM
Post #2

D.I.C Head
**

Joined: 24 Sep, 2008
Posts: 137



Thanked: 4 times
My Contributions
you open the fist project in c#, then you right click the solution and select Add -> Existing Project, so you add the second project in your solution.

Then you add a reference by right clicking the first project->Add reference, go in the Projects tab and select the second project.

After these steps you should be able to access the forms from your second project like this:

CODE
private void button1_Click(object sender, EventArgs e)
        {
            WindowsFormsApplication2.Form1 aa = new WindowsFormsApplication2.Form1();
            aa.Show();
        }


this way you create a new instance of the Form you need from the second project and the Show it.

I hope you understand.

PS: If this helped you, please click the button below: "This Post Was Helpful!"
User is offlineProfile CardPM
+Quote Post

Mattlav

RE: How Do I Merge Two C# Projects And Run A Form From One Of Them In The

30 Jun, 2009 - 06:11 AM
Post #3

New D.I.C Head
*

Joined: 21 Dec, 2008
Posts: 8


My Contributions
Yeh thanks mate it did help! smile.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 12:52PM

Live C# Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month