delphimdisdi

Switch GUI application behavior between SDI and MDI


I currently have an SDI application that is build with Delphi 7, I want the final user to choose the type of interface between SDI and MDI at runtime. my question is how can I change the behavior of the application between SDI and MDI at runtime?

Currently I know a couple of applications build with delphi that allow this: EMS SQL Manager and TOAD.

alt text

thanks in advance.


Solution

  • Download the Jedi JVCL and install it and look at the Demos for JvDocking "docking in code". They do this exactly.

    They mean that you do not actually use the FormStyle=fsMDIChild unless you want lots of problems. MDI is "emulated" when you need it by docking in code.

    Do not convert windows into frames. This is a bad solution.

    For an MDI-like environment, that does not have the MDI problems, use a docking solution (components either commercial or open source that support docking). I use JvDocking which is included in the JEDI JVCL, which is free and open source.

    You use your forms in both "docked" and "undocked" (floating) modes, and this gives you a docked IDE look and feel (VIsual Studio and RAD Studio), and an undocked IDE Look and feel (RAD Studio in undocked, or classic delphi 7).