对于你的问题不是很清楚, 帮你 UP 一下.不过, 我知道不管是不是网络打印机, 在 Delphi 里面的操作都是一样的. 虚拟的打印机, 真实的打印机, 本地的打印机, 共享的打印机, 其它操作系统上的网络打印机, 甚至于可以制作高清晰IC卡像的打印机......在你的OS上都反应在控制面板的"打印机"栏目里, 这它们在 Delphi 里都可以通过TPrinter.Printers来获得. 我想这个基本思路是不会变的. Good Lucky!
在打印之前,显示打印对话框, 让用户选择打印机: PrintDialog.Execute;
不管什么打印机,使用下面的代码应该都可以实现。procedure TfrmPrinter.FormCreate(Sender: TObject); begin // Store the printer names in the combo box. cbPrinter.Items.Assign(Printer.Printers); // Display the default printer in the combo box cbPrinter.ItemIndex:=Printer.PrinterIndex; end;////Use the Printer of user choose procedure TfrmPrinter.cbPrinterChange(Sender: TObject); begin Printer.PrinterIndex:=cbPrinter.ItemIndex; end;
PrintDialog.Execute;
begin
// Store the printer names in the combo box.
cbPrinter.Items.Assign(Printer.Printers);
// Display the default printer in the combo box
cbPrinter.ItemIndex:=Printer.PrinterIndex;
end;////Use the Printer of user choose
procedure TfrmPrinter.cbPrinterChange(Sender: TObject);
begin
Printer.PrinterIndex:=cbPrinter.ItemIndex;
end;
打印机-->网络打印机选项-->next....->ok