GARANTIR DESCONTO

Fórum Verificar a resolução do video... #183745

23/09/2003

0

Olá,

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

Fccavalcanti

Responder

Posts

23/09/2003

Sistemald

Não sei se funciona, mais para saber a quantidade de cores tente esta função:

[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]


Responder

Gostei + 0

23/09/2003

Nildo

E o tamanho da tela:
Screen.width // Largura
Screen.height // Altura


Responder

Gostei + 0

24/09/2003

Mmtoor

Vou te mandar um mel, mas incremente e use isso na abertura do seu form principal/

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


Responder

Gostei + 0

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

Aceitar