Click or drag to resize

GetPrinter Function

X#
-- todo --
Displays the Printer dialog box and returns the name of the selected printer.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION GetPrinter() AS STRING
Request Example View Source

Return Value

Type: String
GETPRINTER( )Return Value Character. GetPrinter( ) returns the name of the selected printer. If you exit the Printer dialog box by pressing Esc or by clicking Cancel or Close, GetPrinter( ) returns an empty string.
Remarks
The contents of the Printer dialog box can differ between versions of Windows. For example, the Printer dialog box might contain only the printer name or include a network path.
Examples
X#
1Clear
2cPrinter = GETPRINTER( )
3WAIT IIF(EMPTY(cPrinter), 'No printer chosen', cPrinter)
See Also