"Printers" unit contains all most all the methods and properties you'd need to control Windows' printer interface. For example, you can easily retrieve the name of the default printer by using the "Printer" (ready to use instance of the "TPrinter" class) object of the "Printers" unit as follows:
uses Printers; function GetDefaultPrinterName : string; begin if(Printer.PrinterIndex > 0)then begin GetDefaultPrinterName := Printer.Printers[ Printer.PrinterIndex ]; end else begin GetDefaultPrinterName := ''; end; end;
ComboBox1.Items := Printer.Printers;
You can also retrieve the status of a print job by using "Printing" and "Aborted" boolean properties.