Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# CrystalReports MDI
Can we add different applications to MDI??
Here is the screen shot of my MDI form.
 
http://img267.imageshack.us/img267/5222/mdiv.jpg[^]
 
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 19:18pm
Comments
Sergey Alexandrovich Kryukov at 15-Feb-13 0:30am
   
Why? why?!
—SA

1 solution

Rate this: bad
good
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:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.standardoutput.aspx[^].
 
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:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
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[^].
 
—SA
  Permalink  
v2
Comments
SweetHoneyBee at 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.
Sergey Alexandrovich Kryukov at 15-Feb-13 0:51am
   
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.
 
—SA

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

  Print Answers RSS
0 OriginalGriff 645
1 Maciej Los 225
2 Richard Deeming 160
3 Suvendu Shekhar Giri 159
4 Abhinav S 151
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 9,135
2 Peter Leow 5,042
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,581


Advertise | Privacy | Mobile
Web02 | 2.8.150327.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2015
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