Delphi, MDI vs Tabs for multi-document interface

delphiinterfacemditabs

I'm developing a multi-document application. Currently it uses MDI which is quite convenient for me (as a developer) as well as for users I believe. However there is one "against" – I haven't found a solution to quickly load many child windows (each time the window is created and maximized to fill the parent's area, there is an 'animation' of resizing which takes a lot of time) so far, thus I'm considering switching back to tabbed interface (which requires some more work, I need to "embed" a form to the page sheet, as there are many "kinds" of forms available, some for editing text documents, some for other objects)…

So, what is your opinion? Should I use MDI or tabbed interface?

Best Answer

To avoid the resizing animation (and thus the delay) of new MDI child windows, send a WM_SETREDRAW message to the parent TForm's ClientHandle property before creating your child windows, and then send it again when you are done, ie:

Self.Perform(WM_SETREDRAW, False, 0);
... create child windows as needed ...
Self.Perform(WM_SETREDRAW, True, 0);
Windows.InvalidateRect(Self.ClientHandle, nil, True);
Windows.UpdateWindow(Self.ClientHandle);
Related Topic