Chris

Try GetDeviceCaps (Windows, not Delphi). I know it works on Printers but I have 
not tried it on a monitor. Here is sample code for a printer:

   try

     {BITSPIXEL determine the number of colours in the device}
     nColourBits := GetDeviceCaps(Printer.Handle,BITSPIXEL);
     Total_Colour_Shades := IntPowerInt(2,nColourBits);

     {PLANES determine the number of colour planes}
     nPlanes := GetDeviceCaps(Printer.Handle,PLANES);
     Total_Colours := IntPowerInt(Total_Colour_Shades,nPlanes);

     {If the number of colours < 3 then it is a black and white printer}
         // You need to determine whether 3 is the correct changeover number
     bColour := Total_Colours > 3;

   except on EIntOverFlow do
     bColour := true;
   end;


Good luck and a Happy New Year,


Bobby Clarke





Chris Lab wrote:
> 
> 
> Hello to all of you,
> 
> I have this problem, we have many TImages (clear nice 24 bits pictures) 
> components on a Form, but some of our clients have erros when they open 
> the FORM cause they dont have a graphic card powerful enough to display 
> all the colors.
> 
> Can anybody help me
> 
> 1. at the FORMCREATE event, get the user max number of colors of his system
> 2. Can you suggest a way to adapt the TImage so the colors would be 
> reduced to that max number of colors and it would work for everyone.
> 
> Thanks a lot.
> 
> Christian
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.432 / Virus Database: 268.16.4/615 - Release Date: 03/01/2007 
> 13:34

Reply via email to