I have changed my code like this:
procedure TMainIDE.DockMasterCreateControl(Sender: TObject; aName: string; var
AControl: TControl; DoDisableAutoSizing: boolean);
procedure CreateForm(Caption: string; NewBounds: TRect);
begin
//AControl:=CreateSimpleForm(aName,Caption,NewBounds,DoDisableAutoSizing);
end;
begin
AControl := Form1;
end;
Form1 is the form I have created with File > New > Form.
The form can be docked, but when I try to save the layout it is not saved. The layout of MainIDE is saved, but Form1 will not be saved as docked.