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

  • Home
  • SEARCH
  • 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 7740799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:52:20+00:00 2026-06-01T08:52:20+00:00

I have a problem with winform application which uses threads to update the UI.

  • 0

I have a problem with winform application which uses threads to update the UI. My application does upload and downloading of files from cloud. Same time I am also displaying Network speed details on the same window. These three operations (upload, download, display n/w speed) are invoked by 3 different threads. Problem is, when I start download/upload, whole window freezes and n/w speed display doesn’t refresh (it is written to refresh at every 1sec interval). what would be the problem? Thanks in advance.

Code is as follows… same way i have written for download. If I call **Upload** first and then **Download** one after the other, first thread will pause and download thread starts. once **Download** is done then **Upload** continues. Its not going in parallel. Also UI doesn’t respond immediately for other button click or window resize, move actions.

public delegate void UploadDelgt();
UploadDelgt UpldDlgtObj;
 private void Form1_Load(object sender, EventArgs e)
{
    UpldDlgtObj = new UploadDelgt(DoUpload);
}

public void load()
{
    Form1 form = this;
    form.Invoke(UpldDlgtObj);
}

private void button1_Click(object sender, EventArgs e)
{
    thrd = new Thread(new ThreadStart(load));
    thrd.Start();
    thrd.IsBackground = true;
}

public void DoUpload()
{
//uploads file block by block and updates the progressbar accordingly..
}
  • 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-01T08:52:21+00:00Added an answer on June 1, 2026 at 8:52 am

    Your UI freezes because you are calling form.Invoke in your load method. From MSDN about Invoke: Executes the specified delegate on the thread that owns the control's underlying window handle.
    So, thought you are calling DoUpload in a separate thread, it is still executed on the GUI thread (which owns the form handle), because it is called with Invoke.

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

Sidebar

Related Questions

I have a WinForm application which uses SqlServer CE 3.5 as database. I use
I have WinForm application which is almost ready to go for production and here
I have a winform application to read values from the registrykey.. so i know
I have a WinForms application which uses a list box to display list of
We have a WinForms desktop application, which is heavily multithreaded. 3 threads run with
I have a drawing application developed in winforms C# which uses many System.Drawing.Bitmap object
I have simple WinForms application where modifying Windows Registry. The problem is that in
I have a combobox which is populated by the Keys enumeration (winforms). The problem
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
we are developing a Winform application in C# and Visual Studio 2010 which we

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.