var
CurrentFrame: TFrame;
procedure TForm1.ShowFrame;
begin
if (Assigned(Self)) and
(Assigned(CurrentFrame)) then
begin
CurrentFrame.Visible := False;
CurrentFrame.SetBounds( 5, 78, 774, 484 ); // Here the position and size of the frame
CurrentFrame.Parent := Self;
// Refresh the application
Application.ProcessMessages;
if SkinManager.Active then
begin
PrepareForAnimation(CurrentFrame);
CurrentFrame.Visible := True;
AnimShowControl(CurrentFrame, 200);
end
else
begin
CurrentFrame.Visible := True;
CurrentFrame.Repaint
end;
end;
end;
using:
procedure TForm1.Button1Click(Sender: TObject);
begin
if Assigned( CurrentFrame ) then
FreeAndNil( CurrentFrame );
CurrentFrame := TFrame_Notices.Create( Self ); // Here your frame
ShowFrame;
end;