Q:請問檔案複製時, 像檔案總管會出現複製的進度表是要呼叫哪一個 API? A:使用 SHFileOperation 範例: 複製整個目錄 (含子目錄) // 你必須 Uses ShellApi; procedure TForm1.Button2Click(Sender: TObject); var OpStruc: TSHFileOpStruct; frombuf, tobuf: Array [0..128] of Char; Begin fillChar( OpStruc, Sizeof(OpStruc), 0 ); FillChar( frombuf, Sizeof(frombuf), 0 ); FillChar( tobuf, Sizeof(tobuf), 0 ); StrPCopy( frombuf, 'd:\brief\*.*' ); StrPCopy( tobuf, 'd:\temp\brief' ); With OpStruc DO Begin Wnd:= Handle; wFunc:= FO_COPY; pFrom:= @frombuf; pTo:=@tobuf; fFlags:= FOF_NOCONFIRMATION or FOF_RENAMEONCOLLISION; fAnyOperationsAborted:= False; hNameMappings:= Nil; lpszProgressTitle:= Nil; end; ShFileOperation( OpStruc ); end;