download

how can i download a file from the web in vb? i dont want any user prompts like where i would like to download it too... kinda like a download manager (GetRight).
I need source! ;)
TCPIP2600Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

VbmasterCommented:
Here's a way to download a file asynchronously, and you can download as many files as possible at the same time, or just one file at a time, you decide. The code you need is at (for free of course)..

http://vbaccelerator.com/codelib/submit/asynctx.htm
0
VbmasterCommented:
If you do not want to use the above control.. for some strange reason.. here's the code to use the Inet control for downloading a file..

  Dim varData() As Byte
  Dim Filenr as Integer

  'Connect to the page
  Call Inet1.Execute("www.altavista.com", "get index.html")

  'Must connect first before we can try to download the file
  Do
    DoEvents
  Loop While Inet1.StillExecuting

  'Download the page and save to a file on disk
  Filenr = FreeFile
  Open "C:\test.html" For Binary As #Filenr
  Do
    varData = Inet1.GetChunk(2048, icByteArray)
    Put #Filenr, , varData
  Loop Until (UBound(varData) = -1)
  Close #Filenr

This example code will save the http://www.altavista.com/index.html and save it to the file "C:\test.htm" on your harddrive.
0
sdland1Commented:
theres a sample at http://lightning.prohosting.com/~shell123 search for tlsNetmicro1.zip also search for ftpsvr.bas
0
sdland1Commented:
theres a sample at http://lightning.prohosting.com/~shell123 search for tlsNetmicro1.zip also search for ftpsvr.bas
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.