Answer the question
In order to leave comments, you need to log in
Why can't I assign values and call the ProgressBar and Label methods on a separate thread?
Good afternoon.
There is a method (uploading photos via URL links) that I want to execute in a separate thread, because my program freezes every time I access a link to the site. I added a ProgressBar element (an operation progress indicator) to the form, and above it a Label , which displays the current image being loaded and how much is left to download.
The problem is that after entering the flow, execution stops at adding the step of the previously created ProgressBar
...
this.progressBar_LoadInfo.PerformStep();
...
...
this.label_progressBarLoadInfo.Text = "Загрузка файла " + splitUrl[splitUrl.Length - 1] + " " + (i + 1).ToString() + " из " + data.Count().ToString();
...
Answer the question
In order to leave comments, you need to log in
Follow this article and everything will work https://docs.microsoft.com/en-us/dotnet/desktop/wi...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question