开发者

How to kill a background worker in vb.net?

开发者 https://www.devze.com 2023-02-15 19:03 出处:网络
I\'m trying to kill a background worker in the .DoWork event of the worker. I was using: backgroundworker.CancelAsync()

I'm trying to kill a background worker in the .DoWork event of the worker. I was using:

backgroundworker.CancelAsync()

But it shows an e开发者_StackOverflow中文版rror saying CancellationPending does not allow

How can I kill a background worker after its work has completed its .DoWork event?


You need to set the WorkerSupportsCancellation property to true if you want to be able to send a cancellation request to the worker.

0

精彩评论

暂无评论...
验证码 换一张
取 消