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 6946823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:36:54+00:00 2026-05-27T13:36:54+00:00

I am trying to make a download manager for my program. But when I

  • 0

I am trying to make a download manager for my program. But when I run this code it gives me the message box say “Download Started” but that is it. I do not get any file downloaded or progress bar change? Does anyone know why?

Public Class frmDownloader

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebClient1.DownloadFileAsync(New Uri("https://s3.amazonaws.com/MinecraftDownload/launcher/Minecraft_Server.exe"), "C:\hi.exe")
        MsgBox("download started")
    End Sub

    Private Sub WebClient1_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles WebClient1.DownloadProgressChanged
        ProgressBar1.Value = e.ProgressPercentage
        MsgBox("Download Progress Changed")
    End Sub


End Class
  • 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-27T13:36:55+00:00Added an answer on May 27, 2026 at 1:36 pm

    The DownloadProgressChanged method is invoked on a different thread than the one that started the download. Inside this callback you seem to be manipulating some GUI element: ProgressBar1.Value. You should never manipulate GUI elements on different threads than the one on which they were created or you might get an exception. Depending on the type of application you are working on there are different ways to marshal calls on the GUI thread. For example in WinForms you should use the Control.BeginInvoke method. In WPF and Silverlight the equivalent is the Dispatcher.BeginInvoke.

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

Sidebar

Related Questions

I am trying to download a CSV file using HttpResponse to make sure that
Trying to make a custom :confirm message for a rails form that returns data
I am trying to make this function download file from the internet. I pass
Good Morning , I have been trying to make a dynamic message box on
I am trying to use my download code that works perfectly fine in my
I'm trying to make it possible for the user to download an Excel spreadsheet
Trying to make a make generic select control that I can dynamically add elements
I have a contact manager program that I'd like to design for multiple network
this is a code snippet taken from https://forums.embarcadero.com/message.jspa?messageID=219481 if FileExists(dstFile) then begin Fs :=
Hello community, I'm trying to debug that I didn't made. This app works online

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.