⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit1.pas

📁 调用PDFCreator打印
💻 PAS
字号:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, QuickRpt, Qrctrls,Printers, ExtCtrls;

type
  TForm1 = class(TForm)
    QuickRep1: TQuickRep;
    QRGroup1: TQRGroup;
    QRBand1: TQRBand;
    QRLabel1: TQRLabel;
    Button5: TButton;
    Memo1: TMemo;
    procedure Button5Click(Sender: TObject);
  private
    function find_window(WinName:string;RepeatTime:string):Boolean;
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  NYflag,bitSave:string;
  h: HWND;
  function EnumChildProc(h: Hwnd;  a: integer): Boolean; stdcall;
  function EnumChildProc_edit(h: Hwnd;  a: integer): Boolean; stdcall;
implementation

{$R *.DFM}

procedure TForm1.Button5Click(Sender: TObject);
var
    x, y:Integer;
    iRecord:Integer;
    iLine:Integer;
    St:String;
    Rc:TRect;
    iW:Integer;
    idx: integer;
    sl: TStringList;
    vtime1,vtime2,tmpfiledatetime:TDatetime;
    tmpfile:string;
    gdirold,gdirnew,str:string ;

begin
  str:='abc';
  sl := TStringList.Create;
  sl.Assign(printer.Printers);
  idx := sl.IndexOf('PDFCreator');

  sl.Free;
  if idx = -1 then
  raise Exception.Create('тぃ

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -