Marcello Impastato
Marcello Impastato

Reputation: 2281

Use copy from windows diplaying the status form

with delphi, what i can display the form that display when i start a copy? Thanks very much.

Upvotes: 0

Views: 288

Answers (1)

Andreas Rejbrand
Andreas Rejbrand

Reputation: 108963

You should use the SHFileOperation function.

procedure TForm1.Button1Click(Sender: TObject);
var
  shfileop: TSHFileOpStruct;
begin
  shfileop.Wnd := Handle;
  shfileop.wFunc := FO_COPY;
  shfileop.pFrom := PChar('C:\myfile.txt'#0);
  shfileop.pTo := PChar('C:\Copy of myfile.txt'#0);
  shfileop.fFlags := 0;
  SHFileOperation(shfileop);
end;

Upvotes: 3

Related Questions