resolução de tela

Delphi

02/08/2003

e aí pessoal
alguem sabe como resolver o problema da resolução de tela?
falô

Ivan


Ivan Andre

Ivan Andre

Curtidas 0

Respostas

Nildo

Nildo

02/08/2003

Como assim?
Q problema?


GOSTEI 0
Paulo

Paulo

02/08/2003

Se o problema é preparar o seu projeto para diferentes resoluções de vídeo, então faça assim:
implementation
uses Unit2;//As units usadas por este form devem estar aqui
const
ScreenWidth: LongInt = 800;
ScreenHeight: LongInt = 600;
{$R *.dfm}//A minha resolução base é 800X600, então só funcionará desta resolução para cima, caso utilise 640X480, é substituir.
Depois no OnCreate do Form, use este código

procedure TForm1.FormCreate(Sender: TObject);
begin
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;
end;


GOSTEI 0
POSTAR