FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper printing in color
Posts: 1
Joined: Mon Dec 15, 2008 06:59 PM
printing in color
Posted: Tue Dec 16, 2008 07:25 AM

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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: printing in color
Posted: Sun Jan 25, 2009 06:26 AM
Jose,

Class TPrinter Method Say() supports the use of colors:
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

Continue the discussion