473,321 Members | 1,669 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,321 software developers and data experts.

Timer Reset

Hi,
i'm using a timer like this:
System.Timers.Timer myTimer= new System.Timers.Timer(60000);

in some conditions i want my timer to be reset... so if something happen i
know i want the timer to start counting again from zero...

simply reset to dont have the Elapsed event to be fired..

how can i do this??

regards.
Nov 17 '05 #1
3 12222
check out the Timer.AutoReset property:

HTH

Ollie Riches

"Gianmaria I." <no*********@hothot.it> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,
i'm using a timer like this:
System.Timers.Timer myTimer= new System.Timers.Timer(60000);

in some conditions i want my timer to be reset... so if something happen i
know i want the timer to start counting again from zero...

simply reset to dont have the Elapsed event to be fired..

how can i do this??

regards.

Nov 17 '05 #2
Hi,
What if you call Stop /Start ?
or you could use Enabled too
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Gianmaria I." <no*********@hothot.it> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,
i'm using a timer like this:
System.Timers.Timer myTimer= new System.Timers.Timer(60000);

in some conditions i want my timer to be reset... so if something happen i
know i want the timer to start counting again from zero...

simply reset to dont have the Elapsed event to be fired..

how can i do this??

regards.

Nov 17 '05 #3

Hi,

AutoReset is not used for this, it's an indication if the timer event should
be risen more than once or not.
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Ollie Riches" <ol**********@phoneanalyser.net> wrote in message
news:eg**************@TK2MSFTNGP10.phx.gbl...
check out the Timer.AutoReset property:

HTH

Ollie Riches

"Gianmaria I." <no*********@hothot.it> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,
i'm using a timer like this:
System.Timers.Timer myTimer= new System.Timers.Timer(60000);

in some conditions i want my timer to be reset... so if something happen
i know i want the timer to start counting again from zero...

simply reset to dont have the Elapsed event to be fired..

how can i do this??

regards.


Nov 17 '05 #4

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

Similar topics

13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
3
by: Peter Johnsson | last post by:
How come the eventhandler for the timer's elapsed time event is called over and over again, even though the AutoReset property is set to false, if you assign a new value to the timer objects...
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...
4
by: Dan | last post by:
Hi, I have a timer on a form (System.Windows.Forms.Timer - Framework 1.1) that is set to 60 seconds as sort an of inactivity monitor. If 60 seconds have elapsed without any user activity I want...
7
by: Mike Eaton | last post by:
Hi All, I have a simple application that allows users to clock in and out and stores the data for use by the payroll department. It spends most of its life as a tray icon and when the user...
1
by: jmgro | last post by:
I have spent way too much time trying to solve the following problem: I have a datalist with a timer in the footer template. It works wonderfully except when the user pages back, then forward,...
0
by: qiangdi_he | last post by:
Hi, Pals, I am using WaitAny( ) to wait for the events triggered by a timer. But it seems like that when the timer's interval elapsed, and the event was set, but WaitAny is still waiting there....
3
by: John Salerno | last post by:
I'd be curious to know if this works any differently on other computers/platforms or while other things are happening in the background. I can't tell if it's the Timer object that isn't keep...
4
by: Bails | last post by:
Hi Im an absolute beginner in programming and am using VB.Net Express. To start my larning I decided to do a "Real World" app instead of "hello world" and am creating a Poker Countdown clock. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.