Código: Selecionar todos
oPrinter:SetFont( "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. )
Código: Selecionar todos
tipoImpressao = ' "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. '
oPrinter:SetFont( tipoImpressao )
xHarbour.
Moderador: Moderadores
Código: Selecionar todos
oPrinter:SetFont( "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. )
Código: Selecionar todos
tipoImpressao = ' "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. '
oPrinter:SetFont( tipoImpressao )
Código: Selecionar todos
tipoImpressao := ' "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. '
oPrinter:SetFont( &tipoImpressao. )Código: Selecionar todos
Private tipoImpressao := ' "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. '
oPrinter:SetFont( &tipoImpressao. )Código: Selecionar todos
Private tipoImpressao := ' "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. '
oPrinter:SetFont( &tipoImpressao )
Código: Selecionar todos
oFont := { "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. }
...
oPrinter:SetFont( oFont[1], oFont[2], oFont[3], oFont[4],oFont[5],oFont[6] )
Código: Selecionar todos
oPrn := win_prn():New(WIN_PrinterGetDefault())
oPrn :LandScape := .F.
oPrn :FormType := WIN_DMPAPER_A4//LETTER//A4
oPrn :Copies := 1
//oPrn:AskProperties := .T.
if !oPrn:Create()
hwg_MsgStop("Não foi criado documento.","Erro")
Return Nil
EndIf
if !oPrn:StartDoc("teste")
hwg_MsgStop("Erro na Impressora.","Erro")
Return Nil
EndIf
oPrn:SetColor( HB_WIN_RGB_BLACK )
tipoImpressao := '"Lucida Console", 8, { 3, -51 }'
oPrn:SetFont( &tipoImpressao. )
__nColFixed:= 3 * oPrn:CharWidth
oPrn:SetPrc(2, 0)
oPrn:SetPos( __nColFixed )
oPrn:Textout( "TESTE", .T. )
oPrn:EndDoc()

Código: Selecionar todos
FUNCTION Main()
//
// comandos...
//
Imprimir( { "Lucida Console", 10,{3,-60},FW_BOLD,.F.,.F. } )
RETURN NIL
//---------------------------------------------------------------
FUNCTION Imprimir( aFontCfg )
LOCAL oPrinter
//
// comandos...
//
oPrinter:SetFont( aFontCfg[1], aFontCfg[2], aFontCfg[3], aFontCfg[4], aFontCfg[5], aFontCfg[6] )
//
// comandos...
//
RETURN NIL
//---------------------------------------------------------------
Código: Selecionar todos
cNomeFonte := "Lucida Console"
oFont := { cNomeFonte, 10,{3,-60},FW_BOLD,.F.,.F. }
Código: Selecionar todos
? "nome do fonte " + oFont[ 1 ]
Imprime( oFont )
Código: Selecionar todos
tipoImpressao := '"Lucida Console", 8, { 3, -51 }'
oPrn:SetFont( &tipoImpressao. )
Código: Selecionar todos
PROCEDURE Main
LOCAL oVar
oVar := '"Lucida",5,5'
Teste( &oVar )
RETURN
FUNCTION teste( x, b, c )
LOCAL oElement
? ValType( x )
? ValType( b )
? ValType( c )
? Len( x )
FOR EACH oElement IN x
? oElement
NEXT
? b
? c
RETURN NIL
Código: Selecionar todos
d:\temp>test
C
N
N
6
L
u
c
i
d
a
5
5
d:\temp>

Código: Selecionar todos
Function Main
Local b1, b2
b1 := Fnc1( Seconds() )
? Eval( b1 )
? "Press any key"
inkey(0)
b2 := Fnc1( Seconds() )
? Eval( b2 )
? "Press any key"
inkey(0)
? Eval( b1,Seconds() )
? "Press any key"
inkey(0)
? Eval( b1 )
?
Return Nil
Function Fnc1( nSec )
Local bCode := {|p1|
Local tmp := nSec
IF p1 != Nil
nSec := p1
ENDIF
Return tmp
}
Return bCode