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.
Printable View
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.
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
[email protected]