Sc0pe Posted January 22, 2005 Posted January 22, 2005 When I use this code to download a file, the files are always at least 2 megabytes so the program "freezes" when you click on anything until the download is finished. Is there a way to make it work better? It's almost like it's not responding until the download is finished...Anyway to fix this? Dim wcClient As System.Net.WebClient = New System.Net.WebClient wcClient.DownloadFile("www.yoursite.com", "Filename.exe") Quote
Administrators PlausiblyDamp Posted January 22, 2005 Administrators Posted January 22, 2005 You may be better of using the HttpWebRequest class - either look at it's async Begin / End GetRequestStream methods, or if you just want to display some indication of progress during a download look at clicky Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Sc0pe Posted January 22, 2005 Author Posted January 22, 2005 (edited) You may be better of using the HttpWebRequest class - either look at it's async Begin / End GetRequestStream methods' date=' or if you just want to display some indication of progress during a download look at clicky I've tried that, the progressbar isn't even close to accurate...it finishes way before it should...Is it set to only work with small files? Enclosed is the sample app that is in that link, the file I try to download is roughly 2 megabytes, the progressbar finishes in about 4 seconds and then the program hangs (unresponsive) for a while. Is there something that needs to be changed? Please check it out, the same url is still there from what I used.web filesize with progressbar.zip Edited January 22, 2005 by Sc0pe Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.