Google
 

Tuesday, November 20, 2007

Get Default Printer Name

Here's how to get the name of the default printer on a computer:

~~~~~~~~~~~~~~~~~~~~~~~~~
uses Printers;
function GetDefaultPrinterName : string;
begin
___if (Printer.PrinterIndex > 0)then
___begin
______Result := Printer.Printers[Printer.PrinterIndex];
___end else
___begin
______Result := '';
___end;
end;

No comments: