const
Orignwidth=800;
Orignheight=600;
Procedure TForm1.FormCreate(Sender:TObject);
begin
Scaled:=true;
if(screen.Width<>Orignwidth) then
begin
height:longint(herght)*longint(screen.height)div orignheight;
width:=longint(width)*longint(screen.width)div orignwidth;
scaleby(screen.width,orignwidth)
end;
end;