function GetColorDepth: integer var dc: HDC; begin dc := GetDC(0); Result := GetDeviceCaps(dc, BITSPIXEL); ReleaseDC(0, dc); end;