在动态后台工作程序代码中以及如何检查后台工作程序是否忙碌?
For Each value In intersect
NumWorkers = NumWorkers + 1
Workers(NumWorkers) = New BackgroundWorker
Workers(NumWorkers).WorkerReportsProgress = True
Workers(NumWorkers).WorkerSupportsCancellation = True
AddHandler Workers(NumWorkers).DoWork, AddressOf WorkerDoWork
Workers(NumWorkers).RunWorkerAsync(value)
AddHandler Workers(NumWorkers).RunWorkerCompleted, AddressOf WorkerCompleted
Next