JavaScript Editor js editor     Web development 



Main Page

Displays the Printer dialog box and returns the name of the selected printer.

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.

Example

The following example clears the main Visual FoxPro window using the CLEAR command. The variable cPrinter stores the return value of GETPRINTER(В ), which displays the Printer dialog box, and the WAIT WINDOW command displays the name of the selected printer or "No printer chosen" if no printer was chosen.

В Copy Code
CLEAR
cPrinter = GETPRINTER( ) 
WAIT WINDOW IIF(EMPTY(cPrinter), 'No printer chosen', cPrinter)

See Also



JavaScript Editor js editor     Web development