FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Clase TPRINTER (Solucionado)
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM

Clase TPRINTER (Solucionado)

Posted: Sat Mar 03, 2018 07:27 PM
Hola Amigos:

Estoy usando la clase TPRINTER así

Code (fw): Select all Collapse
            oPrn:CMSAY(nRow,4.25,"TIE671206BF2",oFnt3,,cClrTxt)


Cómo puedo imprimir el texto en blanco y el fondo negro?

Saludos
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Clase TPRINTER

Posted: Sun Mar 04, 2018 04:26 AM
Method-1
Code (fw): Select all Collapse
   nOldClr  := SetBkColor( oPrn:hDCOut, CLR_BLACK )
   oPrn:CmSay( 10, 4.25,"TIE671206BF2",oFont,,CLR_WHITE, 2 )
   SetBkColor( oPrn:hDC, nOldClr )


Method-2
From FWH 16.04 onwards
Code (fw): Select all Collapse
   @ 20,4.25 PRINT TO oPrn TEXT "TIE671206BF2" SIZE 40,1 CM COLOR CLR_WHITE,CLR_BLACK FONT oFont

We recommend usage of this command.
Full Syntax:
Code (fw): Select all Collapse
#xcommand @ <nRow>, <nCol> PRINT TO <prn> TEXT <cText> ;
      [SIZE <nWidth> [,<nHeight>] ] ;
      [<unit: PIXEL,MM,CM,INCHES>] ;
      [FONT <fnt>] ;
      [ALIGN <aln>] ;
      [COLOR <nTxt> [,<nBck> ] ] ;
      [LASTROW <lrow>] ;
Regards



G. N. Rao.

Hyderabad, India
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM

Re: Clase TPRINTER

Posted: Sun Mar 04, 2018 05:09 PM

Mr. Rao:

Thanks a lot for your answer, because I use FWH0810 I will try
your first option.

Best regads

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM

Re: Clase TPRINTER

Posted: Sun Mar 04, 2018 05:32 PM

Mr. Rao:

The problem was solved succesfully.

Thanks again.

With Best regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero

Continue the discussion