#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Cheltenham, England.
    Posts
    101
    Rep Power
    15

    Question 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?

    TIA.
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    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.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Cheltenham, England.
    Posts
    101
    Rep Power
    15
    Thanks for that - I'd hate to go down the wrong path.

IMN logo majestic logo threadwatch logo seochat tools logo