Przeglądaj źródła

切换默认打印机

MaiXinRong 8 lat temu
rodzic
commit
5075a3c85d
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      Forms/ReportAdjustFrm.pas

+ 4 - 0
Forms/ReportAdjustFrm.pas

@@ -397,7 +397,11 @@ begin
 end;
 
 procedure TReportAdjustForm.cbPrinterSelect(Sender: TObject);
+var
+  szDeviceName: string;
 begin
+  Printer.PrinterIndex := cbPrinter.ItemIndex;
+  szDeviceName := Printer.Printers[Printer.PrinterIndex];
   ChangeDefaultPrinter(cbPrinter.Text);
 end;