Results 1 to 2 of 2

Thread: basic download code with progressbar

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    181

    basic download code with progressbar

    Hey. In my program I want to download something from the internet. Currently I am using the system.net.webclient module. I want to use a progress bar too to indicate how much has downloaded though. It doesn't seem obvious or simple to show that with this type. Can anyone provide me some code for downloading something and showing progress with a progress bar?

    Thanks
    John

  2. #2
    New Member
    Join Date
    Feb 2006
    Posts
    1

    Re: basic download code with progressbar

    I need a bit of help like this also. I have a basic download code:

    VB Code:
    1. Dim myWebClient As New WebClient
    2.         Dim FileName
    3.         FileName = (Mid$(txtFile.Text, InStrRev(txtFile.Text, "/") + 1))
    4.         myWebClient.DownloadFile(txtFile.Text, lblDes.Text + FileName)

    I currently need help with finding out the file size to calculate the progress bar somehow and maybe buffering? I searched high and low and either the code was super long and complex or I simply couldn't load any project files into VB2005. So far the code does work, but hangs a bit on download.

    First week programming. I apologize if it's newbish!
    Nevermind. I found somethign simliar in the Code Bank that I can hack at to fit my purpose.
    Last edited by IDTB; Feb 21st, 2006 at 02:27 AM.

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