Resolução de Vídeo
Como identificar qual é a resolução de vídeo?
Por exemplo, se for 800x600 executar um comando, mas se for 1024x768 executar outro comando.
Por exemplo, se for 800x600 executar um comando, mas se for 1024x768 executar outro comando.
Fmd
Curtidas 0
Respostas
Marcelo.c
10/05/2003
Pelo que entendi o que você precisa está no código abaixo:
Implementation
const
ScreenWidth: LongInt = 800; {I designed my form in 800x600 mode.}
ScreenHeight: LongInt = 600;
{$R *.DFM}
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;
Implementation
const
ScreenWidth: LongInt = 800; {I designed my form in 800x600 mode.}
ScreenHeight: LongInt = 600;
{$R *.DFM}
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
Marcelo.c
10/05/2003
Ou, indo direto ao ponto que você precisa:
if (GetSystemMetrics(SM_CXScreen)=640) and GetSystemMetrics (SM_CYScreen)=480) then PagesDlg.WindowState:=wsMaximized;
if (GetSystemMetrics(SM_CXScreen)=640) and GetSystemMetrics (SM_CYScreen)=480) then PagesDlg.WindowState:=wsMaximized;
GOSTEI 0
Fmd
10/05/2003
Valeu [b:dfd8df7dfa]marcelo.c[/b:dfd8df7dfa]. Era isso mesmo que eu estava precisando.
GOSTEI 0