Clase TDirectPrint

User avatar
acuellar
Posts: 1646
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Clase TDirectPrint

Post by acuellar »

Gracias William

Saludos,

Adhemar
Saludos,

Adhemar C.
Soft-Javi
Posts: 5
Joined: Tue Nov 09, 2010 2:13 pm

Re: Clase TDirectPrint

Post by Soft-Javi »

hola

mes sumo a los comentario de rafa,

aunque despues de 2 AÑOS se envia :-(, que lastima

bye
User avatar
Antonio Linares
Site Admin
Posts: 42561
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 35 times
Been thanked: 80 times
Contact:

Re: Clase TDirectPrint

Post by Antonio Linares »

Más vale tarde que nunca... :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Soft-Javi
Posts: 5
Joined: Tue Nov 09, 2010 2:13 pm

Re: Clase TDirectPrint

Post by Soft-Javi »

hola
claro mas vale tarde que nunca,

pero creo que ya todos los foreros sabemos que no podemos
utilizar dichas lib por los continuos cambios de mejoramientos de (x)harbour y su PCODE

por eso quedo sin comentarios durante 2 años que podrian ser mucho mas provechoso
User avatar
Antonio Linares
Site Admin
Posts: 42561
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 35 times
Been thanked: 80 times
Contact:

Re: Clase TDirectPrint

Post by Antonio Linares »

Lo bueno es que como William ha proporcionado su codigo fuente, no hay problema en recompilarla con nuevas versiones de Harbour :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
sysctrl2
Posts: 1051
Joined: Mon Feb 05, 2007 7:15 pm
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Clase TDirectPrint

Post by sysctrl2 »

Viendo un poquito la class tDirecPrint,

deberia de funcionar con el siguiente ejemplo,

ya nos dira el buen amigo william,

saludos..

Code: Select all | Expand

#include <fivewin.ch>function Main()   local oPrn   local i   local nRow := 1   local nPagina := 1      oPrn := TDirectPrint():New('lpt1')      oPrn:beginprint()      for i := 1 to 330      if nRow = 1         oPrn:bold( .t. )         oPrn:normal()         oPrn:say( nRow, 10, 'Codigo' )            oPrn:say( nRow, 60, 'Pagina:' + cstr(nPagina) )         oPrn:bold( .f. )         oPrn:condensed()         nRow++      endif      oPrn:say( nRow, 10, cstr(i) )      nRow ++      if nRow >= 55         oPrn:eject()         nRow := 1         nPagina ++      endif   next   oPrn:endprint()return nilFUNCTION WCStr( xExp, nDecimals )   LOCAL cType   IF xExp == NIL      RETURN 'NIL'   ENDIF   cType := ValType( xExp )   SWITCH cType      CASE 'C'         RETURN xExp      CASE 'D'         RETURN dToS( xExp )      CASE 'L'         RETURN IIF( xExp, '.T.', '.F.' )      CASE 'N'         IF !HB_IsNil( nDecimals )            RETURN AllTrim(Str( xExp, 11, nDecimals ))         ELSE            RETURN AllTrim(Str( xExp ))         ENDIF      CASE 'A'         RETURN "{ Array of " +  LTrim( Str( Len( xExp ) ) ) + " Items }"      CASE 'B'         RETURN '{|| Block }'      CASE 'O'         RETURN "{ " + xExp:ClassName() + " Object }"      CASE 'P'         RETURN NumToHex( xExp )      CASE 'H'         RETURN "{ Hash of " +  LTrim( Str( Len( xExp ) ) ) + " Items }"      DEFAULT         RETURN "Type: " + cType   ENDRETURN ""#include "wtraw.prg"
Cesar Cortes Cruz
SysCtrl Software
Mexico

' Sin +- FWH es mejor "
User avatar
karinha
Posts: 7942
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: Clase TDirectPrint

Post by karinha »

sysctrl2 wrote:Viendo un poquito la class tDirecPrint,

deberia de funcionar con el siguiente ejemplo,

ya nos dira el buen amigo william,

saludos..

Code: Select all | Expand

#include <fivewin.ch>function Main()   local oPrn   local i   local nRow := 1   local nPagina := 1      oPrn := TDirectPrint():New('lpt1')      oPrn:beginprint()      for i := 1 to 330      if nRow = 1         oPrn:bold( .t. )         oPrn:normal()         oPrn:say( nRow, 10, 'Codigo' )            oPrn:say( nRow, 60, 'Pagina:' + cstr(nPagina) )         oPrn:bold( .f. )         oPrn:condensed()         nRow++      endif      oPrn:say( nRow, 10, cstr(i) )      nRow ++      if nRow >= 55         oPrn:eject()         nRow := 1         nPagina ++      endif   next   oPrn:endprint()return nilFUNCTION WCStr( xExp, nDecimals )   LOCAL cType   IF xExp == NIL      RETURN 'NIL'   ENDIF   cType := ValType( xExp )   SWITCH cType      CASE 'C'         RETURN xExp      CASE 'D'         RETURN dToS( xExp )      CASE 'L'         RETURN IIF( xExp, '.T.', '.F.' )      CASE 'N'         IF !HB_IsNil( nDecimals )            RETURN AllTrim(Str( xExp, 11, nDecimals ))         ELSE            RETURN AllTrim(Str( xExp ))         ENDIF      CASE 'A'         RETURN "{ Array of " +  LTrim( Str( Len( xExp ) ) ) + " Items }"      CASE 'B'         RETURN '{|| Block }'      CASE 'O'         RETURN "{ " + xExp:ClassName() + " Object }"      CASE 'P'         RETURN NumToHex( xExp )      CASE 'H'         RETURN "{ Hash of " +  LTrim( Str( Len( xExp ) ) ) + " Items }"      DEFAULT         RETURN "Type: " + cType   ENDRETURN ""#include "wtraw.prg"



Cesar, y en un puerto USB con una impresora matricial?

Gracias, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Post Reply