How to copy a file and show the windows progress dialog?

The next example uses the SHFileOperation Shell API function. You need to add ShellApi to your uses clause.

uses ShellApi;

procedure CopyFiles(const SourceFile, DestinationFile: String);
var
  SHFileOpStruct : TSHFileOpStruct;
begin
  if FileExists(SourceFile) then
  begin
    FillChar(SHFileOpStruct, SizeOf(TSHFileOpStruct),#0);
    with SHFileOpStruct do
    begin
      Wnd:=Application.Handle;
      wFunc:=FO_COPY;
      fFlags:=FOF_ALLOWUNDO;
      hNameMappings:=nil;
      pFrom:=PChar(SourceFile+#0+#0);
      pTo:=PChar(DestinationFile+#0+#0);
    end;
    ShFileOperation(SHFileOpStruct);
  end;
end;

Source: www.guidogybels.net.