[twsocket] Overbyte ICS FTP upload with progress bar

2015-02-22 Thread Simon Lewis
Try doing this procedure FtpProgress(Sender: TObject; Count: Int64; var Abort: Boolean); procedure TForm2.FormCreate(Sender: TObject); var FTP: TFtpClient; begin FTP.OnProgress64 := FtpProgress; end; procedure TForm2.FtpProgress(Sender: TObject; Count: Int64; var Abort: Boolean); begin

Re: [twsocket] Overbyte ICS FTP upload with progress bar

2015-02-22 Thread Angus Robertson - Magenta Systems Ltd
> procedure TForm2.FtpProgress(Sender: TObject; Count: Int64; > var Abort: Boolean); > begin >ProgressBar.Position := Count; > end; Correct concept, but you also need to set the ProgressBar Min and Max properties to indicate how much progress has been made. The FTP event simply returns a

Re: [twsocket] Overbyte ICS FTP upload with progress bar

2015-02-22 Thread Angus Robertson - Magenta Systems Ltd
> I'm using the ICS Overbyte FTP for uploading a file. I want to > display a progressbar and a speed indicator I've commented on the progress bar in a separate reply, calculating speed simply involves timing how long it takes to transfer so many bytes (using GetTickCount) and doing the sums on t

Re: [twsocket] Overbyte ICS FTP upload with progress bar

2015-02-22 Thread Lester Clayton
I've writen an FTP client that previously used OnFtpProgress, and can confirm that it's called a tremendous amount of times, and in my case caused my client application to hit 100% CPU as a result. The way I've implemented it in the past is to create another FTP Client class derived from ICS F

Re: [twsocket] Overbyte ICS FTP upload with progress bar

2015-02-22 Thread Angus Robertson - Magenta Systems Ltd
> Client class derived from ICS FTPClient, with an added timer which > is turned on at the start of the transfer, and off at the end of > the transfer, and every time the timer is fired (at intervals of > say, 1000 ms), it updates the progress bar. A timer itself is high overhead, another hidde