Avatar of fernandovitale
fernandovitale
Flag for Argentina asked on

Timer BackgroundWorker

I need to know how can i do a timer (minutes:seconds) with BackgroundWorker in VB.NET

Thanks
Visual Basic Classic

Avatar of undefined
Last Comment
fernandovitale

8/22/2022 - Mon
wdosanjos

Do you want a Timer to trigger a BackgroundWorker?  Please elaborate.
Mike Tomlinson

Count up or Count down?

WinForms or WebForms?

A regular timer would probably work just as well...
nepaluz

Add a backgroundworker and a timer to the form.
Set the timer's interval (you can also set this in code)
In the Tick event of the timer, fire off the backgroundworker
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
nepaluz

PS> You will need to start the timer (repeatedly?) somewhere.
1. You could restart the timer when the backgroundworker completes
2. You can have the timer start based on another event (say a change in a label's text). In this case, check to see if the timer is enabled before enabling it again.
ASKER CERTIFIED SOLUTION
Mike Tomlinson

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
fernandovitale

ASKER
Thank Savant! yes.. that is what i want to do... works fine...

Sorry for my bad english.!