Registriert seit: 21. Jul 2002
Ort: Bonn
5.403 Beiträge
Turbo Delphi für Win32
|
Re: Datei kopieren mit Fortschrittsanzeige
16. Feb 2004, 08:12
Delphi-Quellcode:
type
TCallBack = procedure(Position, Size: Longint); { export; }
procedure FastFileCopy(const InFileName, OutFileName: string;
CallBack: TCallBack);
implementation
procedure FastFileCopyCallBack(Position, Size: Longint);
begin
Form1.ProgressBar1.Max := Size;
Form1.ProgressBar1.Position := Position;
end;
procedure FastFileCopy(const InFileName, OutFileName: string;
CallBack: TCallBack);
{...}
begin
{...}
end; {FastFileCopy}
procedure TForm1.Button1Click(Sender: TObject);
var
aCallback : TCallBack;
begin
aCallback := FastFileCopyCallBack;
FastFileCopy('c:\daten.txt', 'c:\test\daten2.txt', aCallback);
end;
Source untested.
Chris
|
|
Zitat
|