Printer and TPrinter
Publicado: Mié Ago 30, 2017 6:47 pm
Good afternoon,
When you create an object of the TPrinter class and change the nPrinterIndex parameter, even after you call the Destroy() method,
the nPrinterIndex parameter of the public variable Printer also changes.
This causes the printer selected by default in the print dialog window to be the last printer selected with the TPrinter object.
If after destroying the TPrinter object ( TPrinter:Destroy() ), you also destroy and recreate the public variable Printer ( Printer:Destroy() and Printer:Create() ),
the printer selected the next time you print, returns to be the default.
The question is, when creating an object of class TPrinter, changing its parameters and then destroying it, the instance of the public variable Printer should also be changed?
Thanks,
André Corrêa
When you create an object of the TPrinter class and change the nPrinterIndex parameter, even after you call the Destroy() method,
the nPrinterIndex parameter of the public variable Printer also changes.
This causes the printer selected by default in the print dialog window to be the last printer selected with the TPrinter object.
If after destroying the TPrinter object ( TPrinter:Destroy() ), you also destroy and recreate the public variable Printer ( Printer:Destroy() and Printer:Create() ),
the printer selected the next time you print, returns to be the default.
The question is, when creating an object of class TPrinter, changing its parameters and then destroying it, the instance of the public variable Printer should also be changed?
Thanks,
André Corrêa