❔ Check for background progress
Hello, i am try to use the backgroundWorker to check for a running background progress to get the ID of it and update the progress of this in a label. but i am stuck in how to make this as seperate thread and update the label and check if the progress is present at any time or not
https://i.imgur.com/YCRg83z.png
Maybe someone can give some tips or help?
3 Replies
did you check the docs?
https://learn.microsoft.com/en-us/dotnet/api/system.componentmodel.backgroundworker?view=net-7.0
long story short
when initializing the worker you set WorkerReportsProgress = true;
then do your stuff in the the backgroudnworker, and when you want to to show the some update call ReportProgress
BackgroundWorker Class (System.ComponentModel)
Executes an operation on a separate thread.
okay, so i can loop stuff in worker in own thread inside process yes
what i try todo is check each 250ms if process with name is active and update this thime the label with the name i give so each 250ms is a check in seperate thread. or can it be done in better way
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.