Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3989202
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:20:39+00:00 2026-05-20T06:20:39+00:00

experts. I’m trying to create a simple file downloader (with GUI). I’m pretty new

  • 0

experts. I’m trying to create a simple file downloader (with GUI). I’m pretty new to Vb.net and I didn’t find any usefull information about this in the books I own. All tutorials in the wild are making me more frustrated, since the snippets I use, in most cases, are different classes.
So I have some basic questions:

  • What should I use? HttpWebRequest/HttpWebResponse or
    FileWebRequest/FileWebResponse?
  • How do I save the ResponseStream to a file ?
  • Is it possible to use ResponseStream to define the kind of File (FileInfo) Class to get basic file information (size, extension, etc)
    • is it generally neccessary, if GetResponse().headers gives you most
      of this info ?

My code, which sucks, because I do not know how to realize the saving….

Private Sub btn_downloader_Click(ByVal sender...) Handles btn_downloader.Click
     'e.g http://codeigniter.com/download.php'
     Dim fileUrl As String = txtBox_url.Text 
     Dim webUri = New Uri(fileUrl)
     Dim wReq As HttpWebRequest = WebRequest.Create(webUri)
     Dim wRes As HttpWebResponse = wReq.GetResponse()
     Dim resUri As Uri = wRes.ResponseUri
     'to ckeck if http://codeigniter.com/download.php gives http://codeigniter.com/download_files/reactor/CodeIgniter_2.0.0.zip and it does!'
     Dim resStream As Stream = wRes.GetResponseStream()

And now I have to somehow use one of the Stream methods to write the file (at this stage only as a Stream), but do not know how.
I saw this in the tutorials

resStream.Read(buffer, offset, count)

but I don’t know what the buffer is and what it is for. Should I set some static values or any dynamic which deppends on Stream-data ?

Need help!

P.S. Sorry for bad English

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:20:40+00:00Added an answer on May 20, 2026 at 6:20 am

    If you are looking to do it quickly without a progress bar or anything that tracks download speed, estimated time left, etc. then I would suggest WebClient.DownloadFileAsync or WebClient.DownloadFile. You should be able to read the mime type with WebClient.ResponseHeaders["content-type"] and then rename the file accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

you experts probably knowing the easyiest ways to open/find a file from asp.net mvc
Any experts available to help me? In my Android main activity, I'm trying to
Hi experts am trying to parse an excel file. its structure is very complex.
Hey experts, actually it's a pretty simple question...just don't know about the answer. I
experts I am trying to implement a downloader which handles HTTP protocol, I am
Dear experts, I am quite new to javascript and I often see coders use
WPF Experts - I am trying to add buttons below my custom listbox and
Dear experts, I was trying to align an paragraph to the middle of an
Dear experts, I was trying to dynamically generate DOM elements using JS. I read
Experts ! i am very new to XML. However, a webapp collects data in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.