PrintJobSettings.getPrinter(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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++;
}