xHarbour Reference Documentation > Function Reference |
Determines if print output can be processed.
IsPrinter( [<cPrinterName>] ) --> lIsPrinter
The function returns .T. (true) when the operating system can process print output, otherwise .F. (false) is returned.
The IsPrinter() function is used to test if an application can pass print output to the operating system. This is usually the case when a print spooler is active. IsPrinter() cannot detect, if a physical printer is ready to print, since this is monitored by the operating system.
If a character string holding a particular printer name is passed, IsPrinter() returns .T. (true) if this printer is installed.
Note: under CA-Clipper (DOS), IsPrinter() checked the readiness of a physical printer. This is not possible with xHarbour's IsPrinter() function due to differences between DOS and modern operating systems.
See also: | GetDefaultPrinter(), GetPrinters(), PCol(), PRow(), SET DEVICE, SET PRINTER, SetPrc() |
Category: | Printer functions |
Source: | rtl\isprint.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example outlines possibilities of getting printer information // different from CA-Clipper (DOS). PROCEDURE Main LOCAL aPrinter := GetPrinters() ? ValToPrg( aPrinter ) ? GetDefaultPrinter() ? IsPrinter() ? IsPrinter( aPrinter[1] ) ? IsPrinter( "HP LaserJet" ) RETURN
http://www.xHarbour.com