Page 1 of 1

How Can i Draw a box 290mm x 210mm in a dialog

PostPosted: Thu Mar 09, 2006 1:12 am
by devwin2004
Dear Coleagues

How Can i Draw a box 290mm x 210mm (exact dimension)
inside a dialog on screen

Thanks

Dante
devwin2004@yahoo.com.ar

PostPosted: Fri Mar 10, 2006 7:23 am
by Antonio Linares
Dante,

In class TPrinter you have this method:
Code: Select all  Expand view
METHOD Cmtr2Pix( nRow, nCol ) CLASS TPrinter

   if ValType( ::nYoffset ) == "U"
    ::nYoffset := 0
   endif
   if ValType( ::nXOffset ) == "U"
    ::nXoffset := 0
   endif

   nRow := Max( 0, ( nRow * 10 * ::nVertRes() / ::nVertSize() ) - ::nYoffset )
   nCol := Max( 0, ( nCol * 10 * ::nHorzRes() / ::nHorzSize() ) - ::nXoffset )

return { nRow, nCol }

you may use its code to turn the mm into pixels.