Hello,I am using following code to show progress when a file is uploaded to FTP server:
procedure TForm1.SockPutCallBack(Sender: TObject; Reason: THookSocketReason; const Value: string); begin case Reason of HR_WriteCount: begin inc(CurrentBytes, StrToIntDef(Value, 0)); lblProgress.Caption := 'Uploaded %' + IntToStr(Round(1000 * (CurrentBytes / TotalBytes))); pbMain.Position := Round(1000 * (CurrentBytes / TotalBytes)); end; HR_Connect: begin CurrentBytes := 0; end; HR_ReadCount: begin // Do something if needed end; HR_Error: begin Memo1.Lines.Add('----- ERROR - '); end; end; end; What mistake am I making in this code? Please help solve this problem... TIA Yogi Yang
------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik
_______________________________________________ synalist-public mailing list synalist-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synalist-public