open project from another one in visual c#

open project from another one in visual c#

Page 1 of 1

2 Replies - 15188 Views - Last Post: 24 December 2008 - 09:27 AM Rate Topic: -----

#1 marim_samy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 23-December 08

open project from another one in visual c#

Post icon  Posted 24 December 2008 - 07:43 AM

please, i want to know how to open form in another project by click on button in my project?
i added concept net c# project in my application, so i have 2 projects but i want to add button in my project to open form in concept net project , i tried this code:
Form1 frm=new Form1(); 
			
			frm.ShowDialog(this);

			frm.Dispose();

			this.Close();



form1 is name of the form in conceptnet project

Is This A Good Question/Topic? 0
  • +

Replies To: open project from another one in visual c#

#2 tody4me  Icon User is offline

  • Banned
  • member icon

Reputation: 12
  • View blog
  • Posts: 1,398
  • Joined: 12-April 06

Re: open project from another one in visual c#

Posted 24 December 2008 - 08:10 AM

You need to start a new process with the name of the program you want to execute, as such:

System.Diagnostics.Process.Start(<file name and path here>);


This post has been edited by tody4me: 24 December 2008 - 08:10 AM

Was This Post Helpful? 0
  • +
  • -

#11 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 773
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: open project from another one in visual c#

Posted 24 December 2008 - 09:27 AM

As I understand, you have 2 projects in the same solution. To open a form from another project, you have to add a reference to that project. In the first project, right-click on the References item in the Solution Explorer window. Select the Add Reference option. Select the Projects tab and select the second project. Click OK. Then, to access a form from the second project just use this:

yourSecondProjectName.Form1 sForm1 = New yourSeondProjectName.form1();
sForm1.Show();


Was This Post Helpful? 1

Page 1 of 1