02-01-2018, 06:58 PM
هذا الكود
[CSHARP]function TfrmURLS.DownloadHTML(const sURL,
sLocalFileName: string): Boolean;
begin
Result:=True;
with TDownLoadURL.Create(nil) do
try
URL:=sURL;
Filename:=sLocalFileName;
OnDownloadProgress := URL_OnDownloadProgress;
try
ExecuteTarget(nil);
except
Result:=False
end;
finally
Free;
end;
end;
procedure TfrmURLS.URL_OnDownloadProgress;
begin
Label1.Caption := StatusText;
pbarCurrentProgress.Max := ProgressMax;
pbarCurrentProgress.Position := Progress;
end;[/CSHARP]
للتذكير فقط الخطا هنا OnDownloadProgress := URL_OnDownloadProgress;
كيف يمكن اضافة فكرة لجلب حجم الملف مثلا لعمل مزامنة مع البروجريس بار او طريقة ما
[CSHARP]function TfrmURLS.DownloadHTML(const sURL,
sLocalFileName: string): Boolean;
begin
Result:=True;
with TDownLoadURL.Create(nil) do
try
URL:=sURL;
Filename:=sLocalFileName;
OnDownloadProgress := URL_OnDownloadProgress;
try
ExecuteTarget(nil);
except
Result:=False
end;
finally
Free;
end;
end;
procedure TfrmURLS.URL_OnDownloadProgress;
begin
Label1.Caption := StatusText;
pbarCurrentProgress.Max := ProgressMax;
pbarCurrentProgress.Position := Progress;
end;[/CSHARP]
للتذكير فقط الخطا هنا OnDownloadProgress := URL_OnDownloadProgress;
كيف يمكن اضافة فكرة لجلب حجم الملف مثلا لعمل مزامنة مع البروجريس بار او طريقة ما

