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

« Previous Version 3 Current »

DEVMODE constructor.

XFRX#DEVMODE::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) && Get internal index for paper size 9
IF m.lii>0
   ?"Paper width in FRU", m.loDEVMODE.aPrinterPapers(m.lii, 2)*10000/254
   ?"Paper length in FRU", m.loDEVMODE.aPrinterPapers(m.lii, 3)*10000/254
ELSE
   ?"Unknown paper size"
ENDIF
  • No labels