xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

PrinterExists()

Checks if a particular printer is installed.

Syntax

PrinterExists( <cPrinterName> ) --> lInstalled

Arguments

<cPrinterName>
This is a character string holding the name of a printer to check.

Return

The function returns .T. (true) if the specified printer is installed, otherwise .F. (false) is returned.

Description

This function checks whether a particular printer is installed or not. The printer name is case sensitive and must be spelled in the exact same way as listed in the control panel.

Info

See also:GetPrinters(), GetDefaultPrinter(), IsPrinter(), PrinterPortToName()
Category: Printer functions , xHarbour extensions
Source:rtl\tprinter.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example outlines case sensitivity of printer names.

   PROCEDURE Main()
      ? PrinterExists( "HP LaserJet 1200 Series PCL" ) // result: .T.
      ? PrinterExists( "HP LASERJET 1200 SERIES PCL" ) // result: .F.
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe