Delphi, MDI vs Tabs for multi-document interface

后端 未结 4 505
醉酒成梦
醉酒成梦 2020-12-30 11:19

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 \"

4条回答
  •  滥情空心
    2020-12-30 11:50

    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);
    

提交回复
热议问题