FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Bugs report & fixes / Informe de errores y arreglos oPrn:DraftMode( )
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
oPrn:DraftMode( )
Posted: Sat Jun 30, 2012 12:10 AM
Tratando de usar esta funcion, al parecer está algo mal....

Cuando la activo, me dibuja oPrn:Box y oPrn:RoundBox como 4 veces mas grande.. solamente Horizontalmente
El Brush se aumenta en los cuatro lados...

Code (fw): Select all Collapse
#include "FiveWin.ch"

#define DMPAPER_LETTER 1 // Letter 8 1/2 x 11 in

Function Main()
    Reporte1()
Return NIL

Function Reporte1()
    LOCAL nHeight, nWidth 
    LOCAL AvailHeight, AvailWidth
    LOCAL nLeftMargin, nTopMargin, nRightMargin, nBottomMargin
    LOCAL nHeaderHeight, nFooterHeight
    LOCAL oBrush, oPen
        
    PRINT oPrn NAME "PEDIDO DE VENTA" PREVIEW
        oPrn:SetPage(DMPAPER_LETTER)
        oPrn:DraftMode( .t. )

        nHeight := oPrn:nVertRes()
        nWidth  := oPrn:nHorzRes()
        
        nLeftMargin    := ( nWidth / 17 )
        nRightMargin   := ( nWidth - nLeftMargin )
        nTopMargin     := ( nHeight / 22 )
        nBottomMargin  := ( nHeight - nRightMargin )
        
        nAvailHeight   := ( nHeight - ( nTopMargin + nBottomMargin ) )
        
        nRowStep = oPrn:nVertRes() / 66   
        nColStep = oPrn:nHorzRes() / 80   
        
        prow:=nRowStep
        pcol:=nColStep
        
        PAGE
            define brush oBrush color nRGB( 204, 255, 153 )
            DEFINE PEN oPen STYLE 0 WIDTH 8 COLOR CLR_GRAY
            
            oPrn:Box(  prow , nLeftMargin , prow + 1000 , nRightMargin , oPen, nRGB(220,220,220) ) 
        oPrn:EndPage()
        
    ENDPRINT
    
Return nil

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Continue the discussion