Вниз
Скачать: CL | DM;

Копирование файлов с прогрессом   Найти похожие ветки 

 
DSKalugin ©   (2005-01-29 13:49) [0]

Как вызывать функцию копирования виндовс, которая показывает наглядно на форме прогрессбар и анимацию (лист перелетает из папки в папку) с кнопкаой "Отмена"


 
kaZaNoVa ©   (2005-01-29 14:35) [1]

может так ? (не проверял)

function TForm1.CopyFolder(Owner: integer; Source,Destination: string; RenameOnCollision,Confirm: boolean): boolean;
const Aborted: Boolean = False;
var ShFileStructure: TSHFileOpStruct;
begin
While pos(";",Source)>0 do
  Source[pos(";",Source)]:=#0;
While pos(";",Destination)>0 do
  Destination[pos(";",Destination)]:=#0;
Source:=Source+#0#0;
Destination:=Destination+#0#0;

ShFileStructure.Wnd := Owner;
ShFileStructure.wFunc := FO_Copy;
ShFileStructure.pFrom := PChar(Source);
ShFileStructure.pTo := PChar(Destination);
ShFileStructure.fFlags := FOF_ALLOWUNDO or FOF_NOCONFIRMMKDIR;
if RenameOnCollision then
  ShFileStructure.fFlags := ShFileStructure.fFlags or FOF_RENAMEONCOLLISION;
if not Confirm then
  ShFileStructure.fFlags := ShFileStructure.fFlags or FOF_NOCONFIRMATION;
ShFileStructure.fAnyOperationsAborted := Aborted;
ShFileStructure.hNameMappings := nil;
ShFileStructure.lpszProgressTitle := nil;

result:=(SHFileOperation(ShFileStructure)=0) and (not Aborted);
end;


 
DSKalugin ©   (2005-01-29 15:11) [2]

Спасибо, попробую.
Ужас как все сложно. столько структур надо заполнять...
ох уж эти писатели мокрософта :-((



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.024 c
14-1108710940
Алексей#13
2005-02-18 10:15
2005.03.13
Имеем ли мы право?


14-1108996615
Soft
2005-02-21 17:36
2005.03.13
Скажи Microsoft НЕТ!


14-1108990234
Calm
2005-02-21 15:50
2005.03.13
Использует ли кто-нибудь вас UML ?


3-1108448610
first_may
2005-02-15 09:23
2005.03.13
BLOB


1-1109744147
pkm
2005-03-02 09:15
2005.03.13
В Excel е залить ячейку нужным цветом.




   Наверх