473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

timer.enabled vs. timer.start()

Hi,

what is the right way to start a timer?

timer.enabled = true

or

timer.start()?
Why are there two possibilities anyway?

Is .enabled the old VB6-way? and .Start() the new .NET-way?

Thankx for your help.

Greetings.

Andy
Aug 24 '08 #1
2 9187
On Aug 24, 10:33 pm, Andreas Hohn <andr...@hohn.netwrote:
Hi,

what is the right way to start a timer?

timer.enabled = true

or

timer.start()?

Why are there two possibilities anyway?

Is .enabled the old VB6-way? and .Start() the new .NET-way?

Thankx for your help.

Greetings.

Andy
Hi,
Timer's "Enabled" property can be used to check whether it's running
and enabled in a if-else block, Start method starts ticking.
Furthermore, "Enabled=True" property can be used to start the timer
also in the same way like "Enabled=False" does the same as Timer's
"Stop" method.

Thanks,

Onur Güzel
Aug 24 '08 #2
If you are referring to System.Timers.Timer:
<http://bytes.com/forum/thread386223.html>

If you mean System.Windows.Form.Timer, then this
<http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.start.aspx>
suggests that both methods are equivalent.

On Sun, 24 Aug 2008 21:33:42 +0200, Andreas Hohn <an*****@hohn.net>
wrote:
>Hi,

what is the right way to start a timer?

timer.enabled = true

or

timer.start()?
Why are there two possibilities anyway?

Is .enabled the old VB6-way? and .Start() the new .NET-way?

Thankx for your help.

Greetings.

Andy
Aug 24 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rick Brown | last post by:
I want a textbox in an Access97 form to countdown from 100 to 0 when a command button is clicked. Default Value of textbox is 100. Currently clicking the command button starts the function running...
2
by: DaveF | last post by:
I am trying to write a service to fire an ftp object off. I want to wait 2 minutes and then download the files. Then repeat every 2 minutes. The files just seem to stop downloading. Does that timer...
7
by: Noozer | last post by:
I have a timer on a form. It isn't firing at all. I know that the timer is enabled, and that the interval is low (4000, which should be 4 seconds). To ensure the timer wasn't being inadvertantly...
6
by: eBob.com | last post by:
My VB.Net app will require a timer of some sort. So I did some research and decided to use System.Windows.Forms.Timer, I guess mainly because while I have practically no experience with Events, I...
2
by: John David Thornton | last post by:
I've got a Windows Service class, and I put a System.Threading.Timer, and I've coded it as shown below. However, when I install the service and then start it in MMC, I get a peculiar message: ...
17
by: Ratnesh Raval | last post by:
hi all, i m having some problem in timer control. sub timer.tick() timer.stop() do...something timer.enabled = true end sub
3
by: Beemer Biker | last post by:
Unaccountably, I cannot re-enable a timer from an background thread. The disable works fine, I just cannot get it to start back up. There is no method "InvokeRequired" like there is for...
2
by: =?Utf-8?B?U3VyZXNoIFJlZGR5?= | last post by:
I am getting a strange problem with IE7 tabs. The web application I am working (developed in ASP.Net, .Net 2.0), will show a popup message with the count down timer 2 minutes before session time...
7
by: seegoon | last post by:
Hi to all. I have a application that receives data via the serial port. I don't know the number of bytes that are going to be coming in. It could be 10 up to 150. (9600 baud) I have decided to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.