http://www.delphibbs.com/keylife/iblog_show.asp?xid=19283
得到打印机
function TOperPrint.GetPrintrStr: String;
begin
if GetPrintrCount>0 then
Result:=Printer.Printers.Strings[0];
end;
连接打印机
function TOperPrint.ConnPrinter(PrintrStr: String): Boolean;
begin
Result:=False;
try
if AddPrinterConnection(Pchar(PrintrStr)) then
Result:=True;
except
end;