I have trouble in minimizing all my MDIChildren and came across MDIChild to minimize not activated properly
My code to minimize all my children is:
procedure TMainWindow.MinimizeAll1Click(Sender: TObject);
var
i: Integer;
begin
for i := 0 to MDIChildCount - 1 do begin
MDIChildren[i].WindowState := wsMinimized;
//ShowWindow(MDIChildren[i].Handle, SW_MINIMIZE)
end;
end;
I tried both methods (SW_MINIMIZE and wsMinimized) but for some reason one last MDI children form gets NOT minimized. However if you try to minimize all the children again, it works. The minimize all works in the MDIAPP example from Delphi XE. How do I properly minimize all MDI Children in 1 routine?