VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A URLDownloadToFile Demo WITH PROGRESS bar/CANCEL Update: 18 May 2010

by CptnVic (6 Submissions)
Category: Internet/HTML
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (18 Votes)

Updated 18 May 2010: The IBindStatusCallback events for URLDownloadToFile are in a class module for easier use/portability. The class now supports download progress bar(s) AND CANCEL with 5 extra events exposed. Now you can add progress bars to your downloads... and free your app from waiting while the file(s) download. I have included an easily modifiable download window to show the progress of your downloads while your app does something else (see the screen shot). It will do multiple downloads with progress. I give you my personal guarantee that you'll find nothing like this on VBC! I did not write this code for this purpose, but you could easily use this code to download a list of updated files (from the internet), then parse the file list and 'auto-update' the files on the local computer. I have also included a DeleteUrlCacheEntry routine from the Wininet api to force a 'fresh copy' download from the internet. Otherwise, URLDownloadToFile will often download a local copy of the requested file that is cached in IE. The project DOES need a type library (freely downloaded) and complete instructions are in the zip. The type lib. is NOT distributed with your app... needed parts are compiled into your project by VB. As is my want, there are more comments than code. If you just started writing VB code this morning, you can download this dude and have it running in 5 minutes AND you'll understand the whole process in 10 minutes! Semi-Guaranteed as usual! BE SURE TO READ THE READ_ME_FIRST.TXT File for instructions on how to get and install the FREE type library needed!
Your most ardent admirer,
CptnVic

Inputs
URL of file(S) to download (any type file o.k.)
Assumes
The type library must be: 1)Downloaded 2)Registered locally 3)Referenced Complete instructions are in the zip.
Code Returns
Downloaded File
Side Effects
None, or I wouldn't post the demo!
API Declarations
Several, all well documented/commented.
See the zip

Rate A URLDownloadToFile Demo WITH PROGRESS bar/CANCEL Update: 18 May 2010

Download A URLDownloadToFile Demo WITH PROGRESS bar/CANCEL Update: 18 May 2010

Download A URLDownloadToFile Demo WITH PROGRESS bar/CANCEL Update: 18 May 2010 (20 KB)

A URLDownloadToFile Demo WITH PROGRESS bar/CANCEL Update: 18 May 2010 Comments

No comments have been posted about A URLDownloadToFile Demo WITH PROGRESS bar/CANCEL Update: 18 May 2010. Why not be the first to post a comment about A URLDownloadToFile Demo WITH PROGRESS bar/CANCEL Update: 18 May 2010.

Post your comment

Subject:
Message:
0/1000 characters