Important alert: (current site time 7/16/2013 3:12:42 AM EDT)
 

winzip icon

HTTP File Downloader OCX

Email
Submitted on: 6/1/2001 6:18:24 PM
By: Sean Gallardy  
Level: Intermediate
User Rating: By 46 Users
Compatibility: VB 5.0, VB 6.0
Views: 36152
author picture
(About the author)
 
     Added: Cancel feature ,error codes ,Time Remainaing ,Tansfer Rate , preserve file type, Check if connected, Connection type, prompt for overwrite, Pause. Fixed: Now when you open the project all the files are together , Fixed the file open error, fixed cancel error. This is a http file downloader OCX. All you have to do is supply a few things like the URL,Where to save the file at, You can even set chunk sizes. I'm doing more work on it, so expect to see resume supporting and more functions/features! It took me some time, so please give it a vote on what you think it deserves!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 8 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

6/1/2001 6:26:35 PMSean Gallardy

I'm working on the next version. So far i am including Resume,Estimated time left, Transfer rate, adding some more properties. Can anyone think of anythin else?
(If this comment was disrespectful, please report it.)

 
6/1/2001 6:54:00 PMaustin

files are missing

(If this comment was disrespectful, please report it.)

 
6/1/2001 6:59:56 PMSean Gallardy

There should be 9 files in the zip. load the project, not the control.
(If this comment was disrespectful, please report it.)

 
6/1/2001 8:53:53 PMAric

This is just what i needed.
(If this comment was disrespectful, please report it.)

 
6/2/2001 1:36:57 PMSteve

A 'stop download' feature would be nice...

Great work !!!
(If this comment was disrespectful, please report it.)

 
6/2/2001 2:28:59 PMRandy

I am having problems loading the project. Is this a VB 6.0 project? Can it be ran from any directory (it was looking for files under
(If this comment was disrespectful, please report it.)

 
6/2/2001 3:37:09 PMSteve

There's one problem: you cannot access the downloaded file untill the .ocx was unloaded.

To fix that, add the missing 'Close #1' to the 'Sub Download' in the DLMain.ctl right after

Loop While UBound(bData, 1) > 0

Close #1
(If this comment was disrespectful, please report it.)

 
6/2/2001 3:56:16 PMSean Gallardy

Steve, i have succesfully added a 'Cancel' command, i see the bug now, thanks for responding! It has also been fixed.
To Randy, All the files should be there,It WAS made in VB6.0, although i was informed some things did not load in vb.net. Open up the'Project 1.vbp' file instead of the .ctl file. If your adding the control to another program, make sure to add all the property pages as well.
(If this comment was disrespectful, please report it.)

 
6/3/2001 6:10:51 PMopello

when is the next release planned?
(If this comment was disrespectful, please report it.)

 
6/3/2001 9:12:22 PMSean Gallardy

I am releasing a new one today with the Cancel feature, the close bug fixed, and an error code along with status. I have gotten e-mails for Block Downloads, which will be available soon once i work out the bugs in it.
(If this comment was disrespectful, please report it.)

 
6/5/2001 12:17:49 PMopello

if you get a 404 error (file not found) then you still try to set the progressbar max property to the filesize, there is no filesize, so there is a runtime error spawned. Just need a bit of error handeling in your control, or in the command_click procedure.
(If this comment was disrespectful, please report it.)

 
6/6/2001 3:51:49 AMThomas Sturm

And you claim yourself to be a Beginner ? Tz, Tz, Tz ...
(If this comment was disrespectful, please report it.)

 
6/9/2001 10:13:55 AMopello

Hey Sean, you still need error handeling for the file not found error (just enter a fake address to get your not found error, http://www.xyz.com/xyz.xyz, and you will see the runtime error generated. I coded it out of mine, but I don't know how to apply it to yours ... raise an error occurred event (don't remember if you do or not) and then check for it ... ) also, I don't think you got the transfer rate correct, I was getting 17 - 20 KB on my 56k modem, and I usually only get 5 kbps on downloads. Other than that, you need to disable the cancel button (or make it if download = true then ignore cancel commands, because if you click cancel after a download is complete, then you start the next download, it will be canceled.) Also, try canceling in mid-download, then 're-downloading'. It should restart, but it just freezes. Other than those few qualms ;) I think you have a great code!
(If this comment was disrespectful, please report it.)

 
6/10/2001 1:52:06 AMSean Gallardy

I haven't updated yet, thats why there is still no error code. The transfer is correct, sometimes the IE download says 15-20k on my 56k, and whats funny is it does. The cancel bug HAS been fixed. I have never had the download freeze on me like you say, but i will keep trying. Thanks opello!
(If this comment was disrespectful, please report it.)

 
6/10/2001 12:40:39 PMopello

I'm sorry, my mistake. After testing with larger files, I received more realistic (rather expected) results. Sorry about that! :( Again, Great code!
(If this comment was disrespectful, please report it.)

 
6/12/2001 3:58:10 AMFurious_Rage

I have not tested the program ,in lack of time, but when i get home, i will test it, and get back with ratins, greetings from Sweden
(If this comment was disrespectful, please report it.)

 
6/13/2001 7:45:20 PMopello

test away, this is the most useful code that I have found on here. Sure, some is entertaining, but this is actually usable to me. KUDOS!
(If this comment was disrespectful, please report it.)

 
6/17/2001 8:25:03 PMCYBORG

I get miaaing DLMain.ctl
(If this comment was disrespectful, please report it.)

 
6/17/2001 8:25:49 PMCYBORG

miaaing = missing
§orry
(If this comment was disrespectful, please report it.)

 
6/17/2001 8:47:53 PMSean Gallardy

Yeah, i accidentally deleted it. It will be fixed very soon.
(If this comment was disrespectful, please report it.)

 
6/18/2001 12:07:16 AMSean Gallardy

It's Fixed!
(If this comment was disrespectful, please report it.)

 
7/11/2001 6:50:29 PMViper-one

If i hade to add something it would be alternative download location or download all links on this site or viewing all the links and then selecting them for DW. I must say that this is a greate prog... Keep up the good work... Viper-one(DK)
(If this comment was disrespectful, please report it.)

 
7/11/2001 7:21:36 PMYo-yo man

y don't u make an HTML editor or some'n?
(If this comment was disrespectful, please report it.)

 
7/15/2001 6:56:29 AMEric Malamisura

Pretty good job..I have source code from a program I made a while back and released on here full source code that has resume, pause, stop, etc. etc. using just winsock of course!! If you need some help getting those things to work it should be of great help to you. You can search this site for 'DownloadIt' or goto my page at www.elucidsoftware.com

Later,
Eric
(If this comment was disrespectful, please report it.)

 
7/16/2001 7:23:01 AMThe Bozena

Nice control, but will you develop proxy (with authentication) support ?
(If this comment was disrespectful, please report it.)

 
7/22/2001 6:27:17 PMCoolme

how do i use it ?
(If this comment was disrespectful, please report it.)

 
7/26/2001 5:45:42 PMJake (Evergreen98)

Wow! This control definitely deserves 5/5 and the contest award...worked perfectly through all my trial test, and now I plan to use it internally for checking my website. Great work, and it's so easy to use! 5/5 all the way!
(My speed for your reference was ~250kB/s to ~317kB/s on cable. Pretty good speed for HTTP!)

One last request...could you possibly either do an FTP version of this control, or show me how? Thanks.
(If this comment was disrespectful, please report it.)

 
7/29/2001 9:21:28 AMopello

Hey Sean. I've somewhat lost contact with your code. Is this a new revision? After the 5th one? (Is this #6?)

Dan
(If this comment was disrespectful, please report it.)

 
7/30/2001 2:37:14 PMVoyager

Sorry Stumbled across this - looks great but could some one please let me know were u would use this - could u use it to download files auto from a web site ?

thanx allot
(If this comment was disrespectful, please report it.)

 
8/24/2001 3:16:34 AMmaagz

ok maybe I'm a dumbass but the test project doesn't seem to work, resume button becomes never enabled.. and how about the download properties box, why is it in the project if it is never used.. i'm a mess or this project is a mess?
(If this comment was disrespectful, please report it.)

 
8/28/2001 3:15:09 PMMax Bolingbroke

Wow! This is amazing! I REALLY like it.. now i have to figure out how it works! thanks for making this available!
(If this comment was disrespectful, please report it.)

 
9/7/2001 3:11:05 PMMax Bolingbroke

I am trying to add this to a application, but when I start the download of a file the statment: I1.GetHeader(
(If this comment was disrespectful, please report it.)

 
9/8/2001 4:23:02 PMMax B Again

I have traced the problem back and it seems to be unable to download anything except the example page - www.aol.com !!
I've tried changing the URL in the application which comes with it, but it dosent work! File size = 0 and "Error retreiving Header information" And the file downloads as 0 bytes long! The url i tried it with was "http://www.planetblackandwhite.com" I just dont understand the problem! Please help me!
(If this comment was disrespectful, please report it.)

 
11/6/2001 8:29:35 PMvisualblind

This code deserves 10/5. I can tell you spend a lot of time with this.
(If this comment was disrespectful, please report it.)

 
8/5/2002 4:00:35 AMNathan

Note: The downloaded files are saved by default to 'c:\file1.tmp'.
(If this comment was disrespectful, please report it.)

 
11/10/2002 4:15:01 PM

Can anyone give me a Compiled Version?? As I dont have MSVB and this proggy is just what i want ;)
(If this comment was disrespectful, please report it.)

 
5/19/2004 2:36:58 PMShane M Croft

I fixed the resume error, you simply need to have the sfv=filesize BEFREO you call the download thats why it isnt working, I also fixed some timeing errors and such. got it working like a charm.
(If this comment was disrespectful, please report it.)

 
2/21/2005 4:33:54 PMHardStream Software Development

Maybe you shouldn't use the Internet Transfer Control. This control is, just like Winsock, not available for people with VB6 Learning Edition (the cheapest one). I've had Learning Edition for a while, and I couldn't use Winsock or Internet Transfer Control.
I've also uploaded a Download OCX, but that uses Async. Async is also available for people with VB6 Learning Edition.
I don't know if ya knew thiz, but I thought you should know.
(If this comment was disrespectful, please report it.)

 
2/21/2005 4:36:53 PMHardStream Software Development

/\ Anyway, now I have VB Enterprise Edition. It's a cool control.
*****
(If this comment was disrespectful, please report it.)

 
10/19/2005 3:25:10 AMDarkanian

Hi, please my friend fix this error "File1.tmp" in C, is best with the real filename..then your software = Perfect..please fix :)
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.