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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:42:04+00:00 2026-06-05T02:42:04+00:00

Sorry if the title is a bit nondescript, I couldn’t really word it right.

  • 0

Sorry if the title is a bit nondescript, I couldn’t really word it right.

Basically, what I have is the following scenario:

I have a user-interface (WinForm) that allows users to pick multiple files to download, and then hit the “Download” button to commence downloading. All the downloads are processed asynchronously to avoid locking the form. However, while I don’t want the form to lock up with a “Not Responding” message, I also don’t want the user to be able to modify form fields while the download is running.

Ideally, I wanted to spawn a modal dialog which let’s the user know the state of the download (i.e similar to firefox, except with a modal dialog). This kills 2 birds with one stone as it allows the user to get a good view of the download progress, while also stopping the user interacting with the parent form while the dialog is active.

However, to properly give the user an idea of the download progress I’d need to update the dialog during runtime. This is where I’ve hit a wall. My current idea is to expose some public methods of my dialog class to send it updates when files complete, and call them from within the background download thread (with proper delegates to update controls, etc)

I’m pretty sure this would work as I want, but I was just wondering if there are any more elegant solutions to this problem. Don’t feel limited to the dialog approach, I’m open to all approaches that may offer a better alternative.

Cheers,
J

  • 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-06-05T02:42:06+00:00Added an answer on June 5, 2026 at 2:42 am

    Alternative 1

    You may consider using a BackgroundWorker, it will take of setting a new thread to do the job and provides an event based mechanism to report progress and also a method to request to cancel the operation (it is up to you if you want to use that).

    To set the task for your BackgroundWorker you will need to attach a handler to the event DoWork and then call RunWorkerAsync().

    Alternative 2

    Another alternative is to use IObservable<T> to create a mechanism to respond to the progress of the download, then you could do the binding with using Reactive.

    I take you are new to Reactive. In that case, this is best introduction available (in my opinion):

    http://channel9.msdn.com/Blogs/codefest/DC2010T0100-Keynote-Rx-curing-your-asynchronous-programming-blues


    If you had the freedom to not disable the UI… You could have the progress reported at a status bar, or dedicate a secondary form (which you could let the user close and get back with a NotifyIcon) where you have the current and any pending works.

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

Sidebar

Related Questions

Sorry for the title.....bit difficult to word what I really want to ask. Some
Sorry the title is a bit crappy, I couldn't quite word it properly. Edit:
Sorry if the title is misleading, but I really couldn't think of anything better.
Sorry if the title doesn't make sense. Basically I have a series of strings
Sorry about the title, couldn't really think of anything else to describe the problem
Sorry the title is a little bit long. So I have a twitter account
Sorry if the title sounds a bit vague. Stackoverflow posting newbie here. I have
Sorry, title was a bit vague. Basically, I am making a chat program in
I'm sorry if the title is a bit confusing, but this is my problem:
first of all, sorry if the title is a bit confusing. i'm planning to

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.