Novice self-taught, just learn to use a background thread processing,
Then in the same way want to edit the second background threads,
The Lao shifu excuse me, where is need to pay attention to matters, and how to solve the
CodePudding user response:
Suggest that look at the example of the ms programDefined also have the new object out
BackgroundWorker1=new BackgroundWorker ();//new BackgroundWorker
BackgroundWorker1. WorkerReportsProgress=true;//allow progress report
BackgroundWorker1. WorkerSupportsCancellation=true;//allow cancel the thread
BackgroundWorker1. DoWork +=worker_DoWork;//set the main logic
BackgroundWorker1. ProgressChanged +=worker_ProgressChanged;//schedule change related processing
BackgroundWorker1. RunWorkerCompleted +=worker_RunWorkerCompleted;//thread to complete the processing of
CodePudding user response:
You don't instantiate the objectCodePudding user response:
Not instantiate objects, it is recommended that the first look at examples of multithreading, and then apply,CodePudding user response:
Objects need to be initialized, https://docs.microsoft.com/zh-cn/dotnet/csharp/CodePudding user response: