Results 1 to 2 of 2

Thread: Progress of: Sendding files and recieving files.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2002
    Posts
    95

    Post

    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.

  2. #2
    Addicted Member ShIzO's Avatar
    Join Date
    Apr 1999
    Location
    Bartlett, IL
    Posts
    189

    Post

    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]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width