Function CopyProgressRoutine( TotalFileSize : Int64; TotalBytesTransferred : Int64; StreamSize : Int64; StreamBytesTransferred : Int64; dwStreamNumber : Cardinal; dwCallbackReason : DWord; hSourceFile : THandle; hDestinationFile : THandle; lpData : Pointer):integer; Begin form1.ProgressBar1.Max:=StreamSize; form1.ProgressBar1.Min :=0; form1.ProgressBar1.Position := StreamBytesTransferred; application.ProcessMessages ; Result := PROGRESS_CONTINUE; end; { if copyfileex(PChar(edt1.Text),PChar(edt2.text), @copyprogressroutine, nil, 0, COPY_FILE_FAIL_IF_EXISTS) then showmessage( 'COPY Success '); }