Ver Mensaje Individual
  #4  
Antiguo 25-06-2003
Avatar de __hector
[__hector] __hector is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Santo Domingo, Rep. Dom.
Posts: 1.075
Reputación: 23
__hector Va por buen camino
Que version de delphi utilizas?

Puedes utilizar componentes FastNet? Hice una vez una aplicacion que utilizaba dichos componentes, el componente tiene propiedades como bytessent, bytesreceived y bytestotal con el cual puedes calcular el tamaño y el avance del progressbar (en el evento packetreceived)

bueno, si te sirve, seria algo como:

Código:
procedure TForm1.ftpPacketRecvd(Sender: TObject);
begin
        if (ftp.BytesTotal = ftp.BytesRecvd) then begin
            Application.Terminate;
        end;
       ProgressBar1.Max := Trunc(ftp.BytesTotal);
       ProgressBar1.Position := trunc(ftp.BytesRecvd);
end;

procedure TForm1.ftpConnect(Sender: TObject);
begin
    FTP.Download('ProyectoCTV.exe', 'C:\WINNT\ProyectoCTV.exe');
end;
Cambiarias bytesRecvd por BytesSent, y el metodo Download por Upload, o algo asi
__________________
Héctor Geraldino
Software Engineer
Responder Con Cita