procedure TFrmmain.ShowForm(AClass: TFormClass);
begin
{ create and insert a Form, then show it... }
TheForm:=AClass.Create(Self);
{$IFDEF CLX}
AddFormTo(TheForm,Frmmain,0);
{$ELSE}
with TheForm do
begin
Visible:=False;
BorderStyle:=bsNone;
Parent:=frmmain;
Align:=alClient;
Show;
end;
{$ENDIF}
end;