How to invoke Windows Forms from Different project created Using VS?

Hi,
I have a situation with multiprojects created using VS IDE with different namespaces as mentioned here. I first created a windows application with the nameApp1 and i created another new project with nameApp2 and added to the exisiting project. ie.,App1
Now, all i want is how can i call the Form1 ofApp2 in some event of Form1 ofApp1?
Regards,
DSK Chakravarthy
[897 byte] By [Chakravarthy] at [2008-2-21]
# 1

DSK,

Please do not cross-forum post. You have posted the same question in 5 different forums.

Be patient, someone will eventually help you. So there is not reason to do that. In fact it makes people less likely to help you.

DavidM.Kean at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
David,

Thanks for your post, but i do that just to draw attention from different forums. Any how, you statement seems meaningfull.

Henceforth, I'll consider this.

Regards

Chakravarthy at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...
# 3

Hi DSK,

You would need to qualify the Form1 class with the namespace after having added a Project Reference to App2 in App1 Project.

The code snippet below shows declaring a Form1 class of App2 application within App1 Project's Form1 eventhandler.


CODE SNIPPET

private void Form1_Load(object sender, EventArgs e)
{
App2.Form1 objForm1 = new App2.Form1();
objForm1.Show();
}


Regards,
Vikram

Vikram at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...
# 4
Hi,

you can make a dll out of your App1 and Add it to your Project References. Then youu can use the classes of App1 but you have to ship the dll with your Application.

rgerbig at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...
# 5
Hi Chakrawarthy,

I assumed you had meant a ClassLibrary for App2. In .NET v1.1 and .NET v1.0 its not possible to add add a .EXE file as reference. I tried however in v2.0 and in VS2005 Beta, it allowed me to add another .EXE as a reference.

I was able to compile and it worked as well with another .EXE as a dependency.

Regards,
Vikram

Vikram at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...
# 6
Cross-Posted Question - Already answered here:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=6669

Regards,
Vikram

Vikram at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...
# 7
Cross-Posted Question - Already answered here:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=6669

Regards,
Vikram

Vikram at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...
# 8

This should work. Set a reference to App2 and then in your event in App1.

Assuming App2 is your namespace in the second app...

App2.Form1 form = new App2.Form1()
form.Show

kbarlar at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...
# 9
I merged all of these threads rather than deleting them since multiple answers where given.
JoshLedgard at 2007-8-21 > top of Msdn Tech,Visual C#,Visual C# General...