Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Guys,

I want to know how to stop a download running in the Background(Background worker´) and then resume with clicking on a Button, the Download Manager[^] is written by Carmine_XX.

Code for vb08, please.

I hope you can help me.

[Edit-Added link to the article you mentioned]
Posted
Updated 9-Jun-11 10:18am
v2

1 solution

Have a look at this thread.

http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/52dcb460-90a3-45f2-ae23-bcb60514c542[^]

The above works by saving the state information of the operation each time through its loop. When the user selects "Pause", the background worker is actually cancelled using CancelAsync method. However, the worker thread saves state information every time it updates the UI thread. This stores the "worker process state" on the main thread. Whenever the background worker is started, it simply reads its information from the state variable and goes to work.

Hope this helps... :)

Jasmin
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900