WPCuded 6
I have a list printer names with associated printer index installed on a computer.
I want to pragmatically set the printer to without popping up printer dialog.
Is there a WPCubed method I can use to do this?
TIA
WPCuded 6
I have a list printer names with associated printer index installed on a computer.
I want to pragmatically set the printer to without popping up printer dialog.
Is there a WPCubed method I can use to do this?
TIA
The selection the printer in Delphi works like this:
Printer.PrinterIndex := I
with I beeing the index of the printer in the list Printer.Printers.
I did this way using Fast Reports
frxRepP.PrepareReport;
frxRepP.PrintOptions.ShowDialog := False;
frxRepP.PrintOptions.Printer := FNameImp; //FNameImpis a print name loaded from a .ini file option
frxRepP.SelectPrinter;
if rgOut.ItemIndex = 0 then
frxRepP.ShowReport
else
frxRepP.Print;
frxRepP.PrintOptions.Printer := FDefaultImp; // Returns to default printer also loaded from .ini file
frxRepP.SelectPrinter;
Ok, but does this change anything for WPTools?
As said:
Printer.PrinterIndex := index_of_printer
is all you need to change the Printer.