VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



UPDATED Download Control (without Winsock) v2.1

by Dan Redding - Blue Knot Software (14 Submissions)
Category: Internet/HTML
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

I wanted a quick way to add the ability to retrieve files over the 'net w/o adding extra files to the distribution. Found an example here by Chloe that used the AsyncRead functions of a user control. I didn't really think that control went far enough, so I wrote this new one with lots more flexibility.
This is also a visible control which acts like it's own progress bar on the form (nothing fancy, there are plenty of PB examples here if you wanna soup it up.) It's also pretty smart about file names and can automatically halt the DL if redirected (say, to a 404.html file.) Just thrown in are my own functions for collapsing a path (replace some folders with ...) to fit a given space and returning a formatted size in b, k, M or G given a # of bytes.
Thanks also to Mr. Bobo - I threw his Browse for Folder routine in just so I wouldn't have to add the common dialog to the demo form (not actually used in DL control.)
Hope you all find this useful, I know I will! ;-)
NEW TO UPDATED V2:
- Option to Rename save file if redirected
- Properties to retrive download information outside of the events
- Option to wait till download complete before returning to main form code.
Possible uses:
- Have program check for updates over net
- Get changeable content (news/blogs/tips/ads/etc)
- Retrieve customized batch files

Assumes
This is a download user control. If you are voting, vote on the control, not the demo project. The demo project was thrown together to show off the features, it isn't really a practical complete application in itself.
Side Effects
Assumes a live connection. Download fails immediately if connection not available.

Rate UPDATED Download Control (without Winsock) v2.1

Download UPDATED Download Control (without Winsock) v2.1

Download UPDATED Download Control (without Winsock) v2.1 (21 KB)

UPDATED Download Control (without Winsock) v2.1 Comments

No comments have been posted about UPDATED Download Control (without Winsock) v2.1. Why not be the first to post a comment about UPDATED Download Control (without Winsock) v2.1.

Post your comment

Subject:
Message:
0/1000 characters