I have a BackgroundWorker that creates a timer. The timer makes repeated calls to a DataTable. I only want the BackgroundWorker.RunWorkerCompleted event to get called when the timer stops. How do I do this?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just create a loop in the
BackgroundWorker‘sDoWorkevent handler and repeat the loop until the timer stops. More or less like so:(Obviously I ommitted setting the timer’s
Intervaletc.)