PtrDevice:SetPrinterByPort() Method

<< Click to Display Table of Contents >>

Navigation:  RpPrinter & PtrDevice Class Overview > PtrDevice Class >

PtrDevice:SetPrinterByPort() Method

Previous pageReturn to chapter overviewNext page

Purpose

To select a printer by port.

Syntax

<oPtrDevice>:SetPrinterByPort(cPort, [cPrinter]) lSuccess                                (LOGIC)

Arguments

cPort

 The port you wish to print to.

cPrinter

 Optional printer name to allow the selection of a port and a printer.

Description

This method attempts to select a printer based on the port you specify.  If it is successful, it returns TRUE, otherwise it returns FALSE.

Example

// print to LPT1 regardless of the attached printer

oPtrDevice:SetPrinterByPort("LPT1:")