IdHTTP.Post - 我无法在进度栏中显示进度
我正在尝试显示来自 TIdHTTP 组件的 POST 调用的进度。
procedure TForm1.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
AWorkCount: Int64);
begin
ProgressBar1.Position := AWorkCount;
end;
procedure TForm1.IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
AWorkCountMax: Int64);
begin
Progressbar1.Max := AWorkCountMax;
end;
然而,当我调试这个时,我在 .Max = AWorkCountMax;
行上登陆了两次,第一次该值是 65,第二次该值是 0。
我知道它可能不是必要的,因为它并不需要很长时间,但完全取决于返回的数据量,它可能需要很长时间。
I am trying to display the progress of a POST call from my TIdHTTP component.
procedure TForm1.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
AWorkCount: Int64);
begin
ProgressBar1.Position := AWorkCount;
end;
procedure TForm1.IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode;
AWorkCountMax: Int64);
begin
Progressbar1.Max := AWorkCountMax;
end;
However when I debug this, I land 2 times on the .Max = AWorkCountMax;
line, and the first time the value is 65, and the 2nd time the value is 0.
I know it might not be necessary, since it doesent take long, but all depending on how much data is being returned, it can take long.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
开始
传输
结束
begin
tranfert
end