IdHTTP.Post - No progress for me to display in a progressbar

后端 未结 1 1519
遇见更好的自我
遇见更好的自我 2021-01-27 16:45

I am trying to display the progress of a POST call from my TIdHTTP component.

procedure TForm1.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode;
  AWorkCount:          


        
相关标签:
1条回答
  • 2021-01-27 17:25

    begin

    procedure TForm1.IdHTTPWorkBegin(Sender: TObject; AWorkMode: TWorkMode;
      const AWorkCountMax: Integer);
    begin
       if AWorkMode = wmRead then 
       begin
          ProgressBar.Max := AWorkCountMax; 
          ProgressBar.Position := 0; 
       end;
    end;
    

    tranfert

    procedure TForm1.IdHTTPWork(Sender: TObject; AWorkMode: TWorkMode;
      const AWorkCount: Integer);
    begin
       if AWorkMode=wmRead then 
         ProgressBar.Position := AWorkCount;
    end;
    

    end

    procedure TForm1.IdHTTPWorkEnd(Sender: TObject; AWorkMode: TWorkMode);
    begin
      ProgressBar.Position := 0;
    end;
    
    0 讨论(0)
提交回复
热议问题