MDI / SDI - What's the REAL difference?
I know (or think I know) what the difference is, but I'm wondering if there's a deeply technical reason for choosing one over the other.
As I understand it, an MDI apps child windows are all contained within the main MDI form (if MDIChild is set true) - when the app is minimized, all child windows are minimised to a single entry on the task bar.
The windows for an SDI app exist outside the main form and can be maximised/minimised independently of each other and the main form. It is still possible (as with an MDI form) to have multiple instances of a window co-existing.
Seems to me that MDI gives the best of both worlds - by setting a particular form's MDIChild to false in an MDI app, it will behave as it does in SDI.
So, is it simply a horses-for-courses choice, or am I missing a bigger issue?
Ok, if you set the MDIChild to false, then it actually becomes a SDI form. Both styles server thier own purpose in programming. It just depends on what style you desire and what best performs the task that you are doing.
You are right though in the basic concepts of what the two are. A MDI parent is basically a container for children and is best used when you create MDIChildren as templates and spawn off duplicates of the template for a unique instance. Just like in a word processor and having multiple files open at the same time. Each file is basically the same form, just a new instance of it. SDI is best used for single static forms that you don't need to perform this ability in. There are multiple other reasons to choose either MDI or SDI, this is just a very obvious example of one.
Thanks for that - I'd hate to go down the wrong path.