How MDI works, not a gel with what you are trying to do.
MDI, - , MDI.
Delphi TFrames , . Outlook. :
TMyForm = class(TForm)
private
FCurrentModule : TFrame;
public
property CurrentModule : TFrame read FModule write SetCurrentModule;
end;
procedure TMyForm.SetCurrentModule(ACurrentModule : TFrame);
begin
if assigned(FCurrentModule) then
FreeAndNil(FCurrentModule); // You could cache this if you wanted
FCurrentModule := ACurrentModule;
if assigned(FCurrentModule) then
begin
FCurrentModule.Parent := Self;
FCurrentModule.Align := alClient;
end;
end;
, :
MyForm.CurrentModule := TSomeFrame.Create(nil);
, ( IModule - ), . , , , .