FRX Device Helper Foundation Class
This class provides methods to read and write printer device information in the Visual FoxPro environment.
Category | System Utilities |
---|---|
Default Catalog |
Visual FoxPro Catalog\Foundation Classes\Output\Output Helper Classes |
Class |
frxDeviceHelper |
Base Class |
Custom |
Class Library |
_frxcursor.vcx |
Parent Class |
Custom |
Remarks
This class exposes the algorithms used by ReportOutput.APP, ReportBuilder.APP, and ReportPreview.APP to interpret various printing values and Report (frx) and Label (lbx) table values.
It is primarily useful for developers extending Visual FoxPro reporting functionality. For more information, see Extending Report Functionality in Visual FoxPro.
Properties, Events, Methods | Description |
---|---|
ActualX property |
Physical width of page in device units. Default: 0 |
ActualY property |
Physical length of page in device units. Default: 0 |
DpiX property |
Logical pixels-per-inch in the X dimension. Default: 0 |
DpiY property |
Logical pixels-per-inch in the Y dimension. Default: 0 |
LoadDeviceInfo method |
Parses out print device parameters into member properties given specific device information. Syntax: Return: logical value representing success Arguments: cDriver specifies the printer driver , as stored in a Report table (frx) EXPR field. cDevice specifies the printer name, as stored in a Report table (frx) EXPR field. cDEVMODE is a string representing a structure that holds additional printer information, as stored in a Report table TAG2 field. Remarks: If you omit the optional arguments, this method loads information for the current VFP default printer. |
LoadFromFrx method |
Loads printer device parameters from an FRX cursor header record. Restores current record number and selected workarea afterwards. Syntax: Return: logical value representing success Arguments: cFRXAlias holds the alias of a Report table (frx) currently in use in the environment. This method assumes an alias of "FRX" if you omit the optional cFRXAlias argument. |
mmX property |
Horizontal page size in millimeters. Default: 0 |
mmY property |
Vertical page size in millimeters. Default: 0 |
OffsetX property |
Physical printable page left margin. Default: 0 |
OffsetY property |
Physical printable page top margin. Default: 0 |
Orientation property |
Page orientation (0=Portrait, 1=Landscape). Default: 0 |
PrintableX property |
Horizontal page width in pixels. Default: 0 |
PrintableY property |
Vertical page length in pixels. Default: 0 |
ErrorMessage property |
Contains error text if the LoadDeviceInfo() method returns false. Default: "" |
Example
In this example, an instance of the frxDeviceHelper class displays information about resolution in dots (pixels) per inch for the current VFP default printer.
oDeviceHelper = NEWOBJECT( "frxDeviceHelper" )
IF oDeviceHelper.LoadDeviceInfo()
? oDeviceHelper.DpiX
? oDeviceHelper.DpiY
ELSE
? oDeviceHelper.ErrorMessage
ENDIF
See Also
Reference
Visual FoxPro Foundation Classes A-Z