zoukankan      html  css  js  c++  java
  • Delphi 选择指定打印机的方法《LceMeaning》

    以下代码经本人Delphi XE2下编写并通过

              case Sysconfig.ReadInteger('Printer','IsPrint',0) of
                0:
                  begin
                     if Sysconfig.ReadBool('Printer','Spending',False) then
                       begin
                         if MessageBox(Handle, PChar('是否打印消费单据?                                          '),
                           PChar('打印'), MB_ICONINFORMATION or MB_YESNO or MB_DEFBUTTON1) = IDYES then
                             begin
                               goto GoToS;
                             end;
                       end;
                  end;
                1:
                  begin
                    GoToS :
                    if Sysconfig.ReadBool('Printer','Spending',False) then
                       begin
                          frxReport1.Clear;
                          frxReport1.LoadFromFile('ReportMConsumer.fr3');
                          //frxReport1.ShowReport();
                          frxReport1.PrepareReport;
                          frxReport1.PrintOptions.ShowDialog := False;
                          frxReport1.PrintOptions.Printer := PrintName;  //此处一定要用变量
                          frxReport1.PrintOptions.Copies := Sysconfig.ReadInteger('Printer','SpendingCopies',1);
                          frxReport1.Print;
                       end;
                  end;
              end;
  • 相关阅读:
    hdu1066之数学题
    hdu1065计算几何
    hdu1060
    hdu1056
    appium安装说明
    LR安装说明
    网络编程
    读写excel
    dom
    HTML
  • 原文地址:https://www.cnblogs.com/LceMeaning/p/3503296.html
Copyright © 2011-2022 走看看