Hola anubis.
Siempre que el equipo a instalar la aplicación soporte la resolución en que se compiló, en
Delphi me ha funcionado.
Ya que no lo había intentado antes, hice una prueba en
Lazarus y tambíen funciona. Para realizarla, compilé un form con unos cuantos controles en resolución 1024x768 que es soportada por la mayoría.
El código de prueba que usé es similar al anterior:
Código Delphi
[-]
procedure TForm1.FormCreate(Sender: TObject);
const
Ancho = 1024;
Alto = 768;
begin
if Screen.PixelsPerInch = 96 then
begin
Height := Height * Screen.Height div Alto;
Width := Width * Screen.width div Ancho;
ScaleBy(Screen.Width,Ancho);
end
else if Screen.PixelsPerInch = 120 then
begin
Height := Height *Screen.Height div Alto;
Height := Height+((Height*15) div 100);
Width := Width * Screen.Width div Ancho;
Width := Width+((Width*15) div 100);
ScaleBy(Screen.Width,Ancho);
Top := Top - 70;
Left := Left - 70;
end
else
begin
Height := Height * Screen.Height div Alto;
Width := Width * Screen.width div Ancho;
ScaleBy(Screen.Width,Ancho);
end;
end;
Luego pasé el ejecutable a un equipo de escritorio ejecutándolo en resoluciones desde 800x600 a 1280x768 y en todas mostró el form adaptado a la resolución.
Pero no pude probar con Windows XP virtualbox ya que no lo dispongo, tal vez allí tenga un comportamiento diferente.
Saludos
