Threat de bir klasördeki resimleri alıp, küçültüp başka bir klasöre atıyor. Resim çok olursa programın açılması gecikmesin diye bu yolu seçtim. Threatin sonlanması bazen 2 dakikayı buluyor.
Threat i şöyle çağırıyorum
Kod: Tümünü seç
Createthread(nil, 0, @thread1, nil, 0, hThr1);
Kod: Tümünü seç
try
for i := 0 to High(Form1.ReadPhotos) do
begin
if Form1.StopThread then Exit;
if CopyFile(PChar(Form1.ReadPhotos[i]), PChar(Form1.threadpath + inttostr(i) + '.JPG'), false) then
begin
ResizeImage(Form1.threadpath + inttostr(i) + '.JPG');
......
......
end;
end;
finally
..........
end;
Böyle bir hatayla karşılaşan oldu mu?