1. Home
  2. Computing & Technology
  3. Delphi Programming

Get Default Printer Name

By , About.com Guide

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;

~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» Another way to disable screen saver
« Drag'n'Drop nodes inside TreeView

Explore Delphi Programming
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2001 Delphi Tips
  7. Get Default Printer Name

©2010 About.com, a part of The New York Times Company.

All rights reserved.