Code: Select all
#include "fivewin.ch"
#define PAD_LEFT 0
#define PAD_RIGHT 1
#define PAD_CENTER 2
FUNCTION Main()
LOCAL oPrn, oFont, oPen, oPen1, oPen2, oPen3
LOCAL nLinI, nColI, nLinF, nColF
nLinI := 0.90
nColI := 0.90
nLinF := 28.60
nColF := 20.00
SetDefaultPrinter( PrnGetName() )
PRINT oPrn NAME "Impresión en Vertical.." PREVIEW MODAL
DEFINE FONT oFont NAME "Arial" SIZE 0, - 12 BOLD OF oPrn
DEFINE PEN oPen WIDTH 2 OF oPrn
DEFINE PEN oPen1 WIDTH 4 COLOR CLR_BROWN OF oPrn
DEFINE PEN oPen2 WIDTH 2 COLOR CLR_BROWN OF oPrn
DEFINE PEN oPen3 WIDTH 5 COLOR CLR_HRED OF oPrn
oPrn:SetPage( 9 ) // A4
oPrn:SetPortrait() // Vertical
PAGE
oPrn:Cmtr2Pix( @nLinI, @nColI )
oPrn:cmtr2Pix( @nLinF, @nColF )
oPrn:Box( nLinI, nColI, nLinF, nColF, oPen3 )
oPrn:cmSay( 1.0, 1.0, "Superior Izquierda", oFont, , CLR_BLACK, , PAD_LEFT )
oPrn:cmSay( 1.0, 10.5, "Superior Centro", oFont, , CLR_BLACK, , PAD_CENTER )
oPrn:cmSay( 1.0, 20.0, "Superior Derecha", oFont, , CLR_BLACK, , PAD_RIGHT )
oPrn:cmSay( 28.0, 1.0, "Inferior Izquierda", oFont, , CLR_BLACK, , PAD_LEFT )
oPrn:cmSay( 28.0, 10.5, "Inferior Centro", oFont, , CLR_BLACK, , PAD_CENTER )
oPrn:cmSay( 28.0, 20.0, "Inferior Derecha", oFont, , CLR_BLACK, , PAD_RIGHT )
ENDPAGE
ENDPRINT
RETURN NIL
Saludos.