Fórum Centralizar o programa #221266

20/03/2004

0

Gostaria de saber como faço para centralizar meu programa exatamente no meio da tela em qualquer resolução ....1280x1024 , 800x600.


Bacheschi

Bacheschi

Responder

Posts

21/03/2004

Vinicius2k

Colega,

Propriedade [color=red:69af1f4823]Position [/color:69af1f4823]= poScreenCenter...

T+


Responder

Gostei + 0

21/03/2004

Rocsadan

implementation

const
ScreenWidth: LongInt = 800;
ScreenHeight: LongInt = 600;

no oncreate

scaled := true;
if (screen.width <> ScreenWidth) then
begin
height := longint(height) * longint(screen.height) DIV ScreenHeight;
width := longint(width) * longint(screen.width) DIV ScreenWidth;
ScaleBy(screen.width, ScreenWidth);
end;


Responder

Gostei + 0

21/03/2004

Tarcisiojr

eu prefiro assim:

procedure formPrincipal.Show;
begin
Top:=(Screen.Height div 2) - (Height div 2);
Left:=(Screen.Width div 2) - (Width div 2);
end;


Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar