Multimidia - resolucao do video e numero de cores |
Top Previous Next |
|
Tamanho da tela: ================ Screen.Width Screen.Height
Numero de Cores: ================ function GetColorsCount : integer; var h : hDC; begin Result := 0; try h := GetDC( 0 ); Result := 1 shl( GetDeviceCaps( h, PLANES ) * GetDeviceCaps( h, BITSPIXEL )); finally ReleaseDC( 0, h ); end; end;
Outro Jeito =========== Detectar se o Windows está em 16, 256, 16bit ou 24 bit de cores?
Use a funcao GetDeviceCaps, da API do Windows:
cores := GetDeviceCaps(getDC(0), BITSPIXEL);
"cores" podera ser 8, 16, 24, ou seja, vai ser o numero de bits por pixel. |