05/11/21 19:50:44
procedure TForm1.Button1Click(Sender: TObject);
const
FILE_URL = 'URLリンク(www.indyproject.org)';
FILE_PATH = 'Indy_9_00_17_src.zip';
var
getsize: integer;
filesize: integer;
fs: TFileStream;
begin
fs := TFileStream.Create(FILE_PATH, fmCreate);
try
IdHTTP1.Head(FILE_URL);
getsize := 0;
filesize := IdHTTP1.Response.ContentLength;
Caption := IntToStr(getsize) + '/' + IntToStr(filesize);
IdHTTP1.Get(FILE_URL, fs);
finally
fs.Free;
end;
end;
こんな感じでCaptionに現在のダウンロード量を表示するにはどうすればいいですか?