From: "Joe C. Hecht" Subject: Re: Why do color bitmaps print BW on color printer? Date: Monday, March 05, 2001 12:59 PM > I'm trying to print out simple TImage.Picture.Bitmaps on an HP color inkjet > using code gleaned from the newsgroup. I always get monochrome printouts > instead of color. Why? > [StretchDIBits code snipped] Hi Jim! You may very well need to kick the printer into color mode. Below is some functions to help. Enjoy :) Next, let me say that if you are planning to deploy your code, StretchDIBits() requires about 2000 lines of low level graphics support code to work well, else many of your customers may receive blank or garbled pages, and or system crashes. Our TExcellentImagePrinter product can help, and is available at: http://www.code4sale.com/joehecht/ function IsColorPrinter : bool; var Device : array[0..MAX_PATH] of char; Driver : array[0..MAX_PATH] of char; Port : array[0..MAX_PATH] of char; hDMode : THandle; PDMode : PDEVMODE; begin result := FALSE; Printer.PrinterIndex := Printer.PrinterIndex; Printer.GetPrinter(Device, Driver, Port, hDMode); if hDMode <> 0 then begin pDMode := GlobalLock(hDMode); if pDMode <> nil then begin if ((pDMode^.dmFields AND dm_Color) = dm_Color) then begin result := TRUE; end; GlobalUnlock(hDMode); end; end; end; function SetPrinterColorMode(InColor : BOOL) : BOOL; var Device : array[0..MAX_PATH] of char; Driver : array[0..MAX_PATH] of char; Port : array[0..MAX_PATH] of char; hDMode : THandle; PDMode : PDEVMODE; begin result := FALSE; Printer.PrinterIndex := Printer.PrinterIndex; Printer.GetPrinter(Device, Driver, Port, hDMode); if hDMode <> 0 then begin pDMode := GlobalLock(hDMode); if pDMode <> nil then begin if (pDMode^.dmFields AND dm_Color) = dm_Color then begin if (InColor) then begin pDMode^.dmColor := DMCOLOR_COLOR; end else begin pDMode^.dmColor := DMCOLOR_MONOCHROME; end; result := TRUE; end; GlobalUnlock(hDMode); Printer.PrinterIndex := Printer.PrinterIndex; end; end; end; Joe -- Cycling to cure cancer: http://homepages.borland.com/jkaster/tnt/