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

📄 threadcopy.pas

📁 用delphi开发的有关打印的驱动实例; LIBRARY genprint EXPORTS EnumPrintProcessorDatatypesW OpenPrintProc
💻 PAS
字号:
unit threadcopy;

interface

uses
  Classes, Windows;

type
  { CThreadCopy }

  CThreadCopy = class(TThread)
  private
    { Private-Deklarationen }
    strOld, strNew : string;
    bOverwr : WordBool;
  protected
    procedure Execute; override;
    procedure Copy(var strOldFile : string; var strNewFile : string; bOverwrite : WordBool); virtual; abstract;
  public
    constructor Create(var strOldFile : string; var strNewFile : string; bOverwrite : WordBool);
  end;

  { TCopyFile }
  TCopyFile = class(CThreadCopy)
  protected
    procedure Copy(var strOldFile : string; var strNewFile : string; bOverwrite : WordBool); override;
  end;

implementation
{ CThreadCopy }

procedure CThreadCopy.Execute;
begin
  { Thread code }
  Copy(strOld, strNew, bOverwr);
end;


constructor CThreadCopy.Create(var strOldFile : string; var strNewFile : string; bOverwrite : WordBool);
begin
  strOld := strOldFile;
  strNew := strNewFile;
  bOverwr := bOverwrite;
  FreeOnTerminate := True;
  inherited Create(False);
end;


{ TCopyFile }

procedure TCopyFile.Copy(var strOldFile : string; var strNewFile : string; bOverwrite : WordBool);
begin
  CopyFile(PChar(strOldFile), PChar(strNewFile), bOverwrite);
end;

end.

⌨️ 快捷键说明

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