Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

DEVMODE constructor.

XFRX#WATERMARK::Init(lcDEVMODE, lcPrinterName)

Parameters

lcDEVMODE
 DEVMODE structure. It's equal to TAG field from report for first record.

lcPrinterName
  Specifies printer name.

Examples

m.lcPrinter = GETPRINTER() && select a printer
m.lcTag2 = _xfPrinterProperties(m.lcPrinter, "", .F.) && do not show the dialog, return the default settings
m.loDEVMODE=EVALUATE([xfrx("XFRX#DEVMODE", m.lcTAG2, m.lcPrinter)]) && create DEVMODE object
m.lii=m.loDEVMODE.GetPaperSizeIndex(9)
IF m.lii>0
   ?"Width in FRU", m.loDEVMODE.aPrinterPapers(m.lii, 2)*10000/254
   ?"Length in FRU", m.loDEVMODE.aPrinterPapers(m.lii, 3)*10000/254
ELSE
   ?"Unknown paper size"
ENDIF
  • No labels