Fórum Verificar a resolução do video... #183745
23/09/2003
0
Como faço para que o sistema antes de inicar verifique a resolução do video e as cores e retorne uma mensagem para o usuário...tipo assim :
Verifique :
Este programa necessita de resolução
800 x 600 e 256 cores.
Ou seja o sistema deverá verificar a resolução do video e só permitir se o mesmo estiver com 800x600 e 256 cores.
Grato,
Fábio Cavalcanti
Fccavalcanti
Curtir tópico
+ 0Posts
23/09/2003
Sistemald
[b:05646332bf]var[/b:05646332bf]
hnd: THandle;
bitsPorPixel: integer;
[b:05646332bf]begin[/b:05646332bf]
hnd:= GetDC( Handle );
bitsPorPixel:= GetDeviceCaps( hnd, BITSPIXEL );
// 8 = 256 cores; 16 = high color; 24 = true color
[b:05646332bf]end;[/b:05646332bf]
Gostei + 0
23/09/2003
Nildo
Screen.width // Largura
Screen.height // Altura
Gostei + 0
24/09/2003
Mmtoor
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
label1.caption := ´Largura:´ +inttostr(screen.width);
label2.caption :=´Altura:´ +inttostr(screen.Height);
end;
end.
MMTOOR2003
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)