I'm wondering what the difference is between starting a timer and enabling a timer in vb.net?
Submit Mar, 2018 1. timer.Stop() and timer.Start(), because they are subs of timer.Enabled. Feb, 2018 22. There is no such difference. Feb, 2018 6. Timer.Enable is to access the Timer Start and stop is to start or stop the timer if timer is not enabled we cannot start/stop the timer
Some visual designers, such as those in Microsoft Visual Studio, set the Enabled property to true when inserting a new Timer. Starts raising the Elapsed event by setting Enabled to true. Stops raising the Elapsed event by setting Enabled to false.
If you want to set the timer to false at the beginning of the application (at loading) , you must used timer.Enabled = false, timer.Stop () won't work. This is why I use timer.Enabled = false/true.
If you reset the interval to 10 seconds when count is 3 seconds, the Elapsed event is raised for the first time 13 seconds after Enabled was set to true. Some visual designers, such as those in Microsoft Visual Studio, set the Enabled property to true when inserting a new Timer.
They both do the same thing. According to MSDN Start Method
Starts raising the Elapsed event by setting Enabled to true.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With