Click here to Skip to main content
12,943,904 members (61,562 online)
Rate this:
Please Sign up or sign in to vote.
Can we add different applications to MDI??
Here is the screen shot of my MDI form.[^]

I have created multiple applications before and now I want to add them to this MDI. So how to add them? Do I have to import all projects to my MDI project? I am new to MDI.

Hope my question is clear.
Posted 14-Feb-13 18:18pm
Why? why?!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

First of all, the question makes no sense. There is no such thing as "add application to an application".

If you simply mean that you want to run an application (start a child process), you can do it, but what are you going to do with it? Processes are very well isolated. If they are not intentionally designed for some collaboration, you cannot do much about it. Trying to do such things is not recommended. Even though you can insert a main window of child application (when and if it appears) in some of your forms, this is a dirty trick which will makes the situation even worse. It works with Windows only because its legacy functionality inherited from old Windows versions when Windows was not an OS yet. If will run inside some host form, with all its non-client areas, which, in turn, will brake all the acceptable UI styles; and you still won't have a real control over the application. Don't even think about it.

However, if the child application is a console-only application, you can pretty easily redirect StandardOutput and show the results in your form. The idea is apparent from this MDSN help page, with a code sample:[^].

Now, about your MDI…

Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?
Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is highly discouraged even by Microsoft, in fact, Microsoft dropped it out of WPF and will hardly support it. More importantly, you will scare off all your users if you use MDI. Just don't. Please see:[^],
How to Create MDI Parent Window in WPF?[^].

I can explain what to do instead. Please see my past answers:
How to Create MDI Parent Window in WPF? [Solution 2],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

SweetHoneyBee 15-Feb-13 0:43am
I just wanted to integrate all my applications to look better and I thought MDI will do it.
Btw thanks for your suggestion.
First part of my answer explains that it won't be the integration. Sorry.
The second part should tell you that nothing can "look better" with MDI. I explained much nicer alternatives.

But it wasn't a suggestion. Do you have source code of those child applications or do you develop them? If so, I could probably suggest how to integrate them, if not: it would be a bad idea to get into it at all.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,643
CHill60 2,970
Maciej Los 2,348
Jochen Arndt 1,900
ppolymorphe 1,765

Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100