Launching a .NET Smart Client Application in an MDI form
- Hi,
I have encountered a certain problem in my workplace where we have 2 groups that have developed a .Net smart client application. Now one of the applications will be launching our application. The problem is that I can't find code anywhere that would launch a smart client application in an MDI (Multiple Document Interface) form.
Has anybody out there been able to do this kind of thing or are there other ways around this?
Thanks in advance...- Moved byAland LiMSFT, ModeratorTuesday, November 10, 2009 11:11 AMIncorrect forum (From:ClickOnce and Setup & Deployment Projects)
Answers
Hi comt0006,
Do you mean that you want to show the second application in the first application as a mdi child?
If so, we can add the second application as a reference to the first project and write code like below. The MainForm1 is the main form in the first application and the MainForm2 is the main form in the second application.
public class MainForm1 : Form{
private void ShowSecondMainForm()
{
MainForm2 form = new MainForm2();
form.MdiParent = this;
form.Show();
}
}
Let me know if this does not help.
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.- Marked As Answer byAland LiMSFT, ModeratorFriday, November 13, 2009 2:54 AM
All Replies
This forum is for setup & deployment questions, not for questions on how to run a desktop application within a desktop application. If you post back with your language of choice (C# or VB), I will move your post to the appropriate forum.
In the meantime, I've seen web apps hosted inside WinForms, but not WinForms inside WinForms. Doesn't mean you can't do it, it just means I haven't seen it.
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App DevHi comt0006,
I have moved the thread from the ‘ClickOnce and Setup & Deployment Projects’ forum to the ‘Windows Forms General’ forum, since the issue is about windows forms, there are more experts about windows forms in the ‘Windows Forms General’ forum.
Regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.Hi comt0006,
Do you mean that you want to show the second application in the first application as a mdi child?
If so, we can add the second application as a reference to the first project and write code like below. The MainForm1 is the main form in the first application and the MainForm2 is the main form in the second application.
public class MainForm1 : Form{
private void ShowSecondMainForm()
{
MainForm2 form = new MainForm2();
form.MdiParent = this;
form.Show();
}
}
Let me know if this does not help.
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.- Marked As Answer byAland LiMSFT, ModeratorFriday, November 13, 2009 2:54 AM


