Ver Mensaje Individual
  #5  
Antiguo 29-05-2014
emeritos emeritos is offline
Miembro
 
Registrado: may 2003
Posts: 307
Reputación: 22
emeritos Va por buen camino
Muchisimas Gracias.
He probado esta funcion y mas o menos pero tiene un pequeño fallo (pequeñisimo). Como te dije diseño en 1280X1024 y con esta funcion en el from pertinente se ajusta todo muy bien en horizontal pero se me sale un poquito el vertical, probado en 1024X768 y 800X600. Como puedo ajustarlo tambien verticalmente. Tambien algunos botones con imagenes no se ajustan bien pero eso debo de mirar por que.

La llamada

Código Delphi [-]
ScaleForm(frmpagomes,1280,1024);

La funcion:

Código Delphi [-]
procedure ScaleForm(F: TForm; ScreenWidth, ScreenHeight: LongInt);
begin
   F.Scaled := True;
   F.AutoScroll := False;
   F.AutoSize := False;
   F.Position := poScreenCenter;
   F.Font.Name := 'Arial';
   If (Screen.Width <> ScreenWidth)
      Then
         Begin
             F.Height := LongInt(F.Height) * LongInt(Screen.Height) div ScreenHeight;
             F.Width := LongInt(F.Width) * LongInt(Screen.Width) div ScreenWidth;
             F.ScaleBy(Screen.Width,ScreenWidth) ;
         End;
end;
Responder Con Cita