PDA

Click to See Complete Forum and Search --> : Progress of: Sendding files and recieving files.


programmer
Aug 24th, 1999, 02:55 PM
Hi!
---

Im wrtting a simple file transfer program between two computers ussing the winsock control. I would like to know how can i add a progress bar that will be able to give the progress of the recieved file, and the file that im sendding.

Thanks.

ShIzO
Sep 2nd, 1999, 03:32 AM
hi.

1. you may want to use SendProgress Event when
sending something. It has two parameters,
BytesSent and BytesLeftToSend.
You would need to keep track of total bytes sent and just try devide
bytesSent/total#ofBytes

make ur progress bar 100 values maximum and plug the value that u have received from the above fraction.

2. When you receiving a file, i would preffer to send the file size first with the fileName and then accumulate the number of bytes u have received and again use fraction

bytesReceived/fileSize

any questions email
czort@wans.net