1 unit Unit1; 2 3 interface 4 5 uses 6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 Dialogs,Printers, StdCtrls; 8 9 type 10 TForm1 = class(TForm) 11 Button1: TButton; 12 ListBox1: TListBox; 13 procedure Button1Click(Sender: TObject); 14 private 15 { Private declarations } 16 public 17 { Public declarations } 18 end; 19 20 var 21 Form1: TForm1; 22 23 implementation 24 25 {$R *.dfm} 26 27 procedure TForm1.Button1Click(Sender: TObject); 28 var 29 Printers:TPrinter; 30 begin 31 Printers:=TPrinter.Create; 32 ListBox1.Items.AddStrings(Printers.Printers); 33 Printers.free; 34 end; 35 36 end.