开发者

How to kill a background worker in vb.net?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜