function GetSysColorNum:Integer; Var ScreenDc:HDC; NumBitsPixel:Integer; begin Result:=0; ScreenDc:=GetDC(0); NumBitsPixel:=GetDeviceCaps(ScreenDc, BITSPIXEL); ReleaseDC(ScreenDC); Result:=1 shl NumBitsPixel; End;