Board index » delphi » Printer canvas

Printer canvas

Hi,

How can I change the background color of a printer canvas because it's
always gray?
I use copyrect to copy a paintbox canvas to the printer canvas but the
background is gray.

Thanks.

 

Re:Printer canvas


Quote
> How can I change the background color of a printer canvas because it's
> always gray?
> I use copyrect to copy a paintbox canvas to the printer canvas but the
> background is gray.

You are lucky if you get a printout at all!

Copyrect, Draw, and StretchDraw fail on many printers.

You may also be told to use StretchDIBits(),
however, 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

If you do not need to deploy your applicaition,
and it will only run on the printer, computer, and
operating system you are using now, then use
StretchDraw().

If you plan to deploy your applicaiton, or you will be
using your application on other printers, computers,
and other versions of Windows, then you will need
to invest in a reliable printing unit. Take a look at
TExcellentImagePrinter, available at:

http://www.code4sale.com/joehecht

--
John Kaster is cycling to cure cancer! Lets help him out! http://homepages.borland.com/jkaster/tnt/
Jimmy Page is having a charity artwork sale: Action For Brazil's Children Trust: http://www.abctrust.org.uk/
Whole Lotta Love computing to cure cancer! http://www.wholelottalove.org/

Quote
"TP" <kevi...@pi.be> wrote in message news:9id89b$879$1@news.planetinternet.be...

Re:Printer canvas


The background of your printer canvas isn't gray, I suspect that the
background of the image you're copying is. What does your image look
like on the screen and how are you creating it?

Mitch

Quote
TP wrote:

> Hi,

> How can I change the background color of a printer canvas because it's
> always gray?
> I use copyrect to copy a paintbox canvas to the printer canvas but the
> background is gray.

> Thanks.

Other Threads