printing in color

Post Reply
fagg
Posts: 1
Joined: Mon Dec 15, 2008 6:59 pm
Location: belgium

printing in color

Post by fagg »

I am a non professional fivetech user
I program the print jobs with ' print oprn...'
How can I print fonts in colors??
Thanks for any help
José Deschutter, Belgium
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: printing in color

Post by Antonio Linares »

Jose,

Class TPrinter Method Say() supports the use of colors:

Code: Select all

METHOD Say( nRow, nCol, cText, oFont,;
        nWidth, nClrText, nBkMode, nPad ) CLASS TPrinter
where nClrText is the desired color to use:

oPrinter:Say( 2, 2, "Hello world", oFont, 100, CLR_RED )

There are some predefined colors CLR_... or you can specify the one that you want using:
nRGB( nRedValue, nGreenValue, nBlueValue )
i.e.:
nRGB( 128, 100, 50 )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply