Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.03.13;
Скачать: 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 вся ветка

Текущий архив: 2005.03.13;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.025 c
14-1109141931
syte_ser78
2005-02-23 09:58
2005.03.13
Замена гиперсылок в Excel


8-1101375728
Дмитрий Ботвин
2004-11-25 12:42
2005.03.13
Объемный текст


3-1107869990
denis24
2005-02-08 16:39
2005.03.13
select ..... from .... where name in (........


1-1109516816
Igor_thief
2005-02-27 18:06
2005.03.13
Выделение ячейки в ValueListEditor


14-1109109276
Витос
2005-02-23 00:54
2005.03.13
Dial-Up