Marc Venken wrote:in the print routine :
mybox(5.4,0.75,8.5,9,5)
function Mybox(Ptop,Pleft,PBottom,PRight,nPen)
local aRect,aRect1
default nPen:= 2
define Pen oPen WIDTH nPen
aRect = oPrn:Cmtr2Pix( pTop,pLeft )
aRect1 = oPrn:Cmtr2Pix( pBottom,pRight )
oPrn:Box(aRect[1],aRect[2],aRect1[1],aRect1[2],oPen)
oPen:end()
return nil
I used sample
I use the new Box of printer class made by Nages
oPrn:Box(nRow, nCol, nRow + nHeight, nCol + nWidth, ,,, "CM" )
with no problem
If you wish use your function I have a new relase
Function FormBox(Ptop,Pleft,PBottom,PRight,oPrn,nType,nColor,nPen)
local oPen
local aDes :=array(2)
local aHas:=array(2)
default nColor:=CLR_HGRAY
default nPen:= 2
Define Pen oPen WIDTH nPen COLOR nColor
aDes = oPrn:Cmtr2Pix( pTop,pLeft )
aHas = oPrn:Cmtr2Pix( pBottom,pRight )
IF nType==1 // box
oPrn:Box(aDes[1],aDes[2],aHas[1],aHas[2])
elseif nType==2 //line Horiz
oPrn:Line(aDes[1],aDes[2],aHas[1],aHas[2])
elseif nType==3 //line vert
oPrn:Line(aDes[1],aDes[2],aHas[1],aHas[2])
elseif nType==4 //Box round
oPrn:RoundBox(aDes[1],aDes[2],aHas[1],aHas[2], 70, 70, , )
//RoundBox( nRow, nCol, nBottom, nRight, nWidth, nHeight, oPen, nBGColor, aText, cUnits )
elseif nType==5 //Box con bacground
oPrn:Box(aDes[1],aDes[2],aHas[1],aHas[2],oPen,nColor)
//Box( nRow, nCol, nBottom, nRight, anoPen, noBrush, aText, cUnits )
endif
oPen:end()
return nil
I print my invoice with these function

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com