Compartir a través de


PrintJobSettings.getPrinter(Int32) Method

Definition

Gets the deviceName of a printer.

public:
 virtual System::String ^ getPrinter(int _number);
public virtual string getPrinter (int _number);
abstract member getPrinter : int -> string
override this.getPrinter : int -> string
Public Overridable Function getPrinter (_number As Integer) As String

Parameters

_number
Int32

A value between 1 and the number of available printers.

Returns

The deviceName of the given printer number.

Remarks

The following example demonstrates the getPrinter method.

printJobSettings pjs; 
int i; 
pjs = new printJobSettings(); 
i = 1; 
while (i<=pjs.GetNumberOfPrinters()) 
{ 
    print "Printer No. ", i, " is ", pjs.GetPrinter(i); 
    i++; 
}

Applies to