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

Timer Doesn't Stop!

Hi

I have created a C# app that checks a table every n seconds and if it finds
something it sends the email. The only problem is if you close the
application, the timer keeps going??

I have coded it so that I stop the clock -> send the mail -> then start the
clock but it doesn't stop.

How can I run something like this, that needs to wait n seconds before it
executes some code?

Thanks

Tim
Nov 16 '05 #1
1 1941
SB
What makes you think the timer is still running if the application is
closed? Can you elaborate a bit?

-sb

"Tim Cowan" <ti**********@peopletogo.com> wrote in message
news:VV********************@news20.bellglobal.com. ..
Hi

I have created a C# app that checks a table every n seconds and if it
finds something it sends the email. The only problem is if you close the
application, the timer keeps going??

I have coded it so that I stop the clock -> send the mail -> then start
the clock but it doesn't stop.

How can I run something like this, that needs to wait n seconds before it
executes some code?

Thanks

Tim

Nov 16 '05 #2

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

Similar topics

1
by: Geoff | last post by:
Hey.. I'm having problems with stopping this timer from outside the 'runTimer()' class.. i have no problems calling 'cancel()' from inside the run() method but I want to be able to stop the Timer...
3
by: jam | last post by:
Dear all, I am wrtiing a console application and doing some test on timer, the below is my sample code I got from some site, but I cannot make it work... Error is 'System.Timers.Timer' does not...
3
by: vickey | last post by:
Hi, Im trying to make a page which refreshes by itself.For that i have added a timer with following properties: Autoreset = true Enabled = true interval = 30000 Name = timer1 on timer1_elapsed...
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...
3
by: Tom | last post by:
When using system.timers.timer, which should one use to start/stop the timer? Start/Stop, or Enabled=True/False? If what I read is true, both really do the same thing, so I don't know if there is...
6
by: Michael C | last post by:
I've created a timer object and set it running without keeping a reference to it and not stopping it. Shouldn't the garbage collector pick up that there's no reference to the timer, call finalize...
1
by: Adam Benson | last post by:
Hi, We have figured out that System.Timers.Timer should be avoided because it occasionally stops firing. So, we dutifully began switching over to System.Threading.Timer but somebody at work...
4
by: Boki | last post by:
Hi All, I have a timer, if my data queue Q has data, the timer should start work, if there is no data in Q, the timer should stop. However, there is an event can fire timer to start. Should I...
7
by: Daniele Piccinini | last post by:
Hallo, I've writed a C# windows service in VS 2003. This service use a System.Timers.Timer to periodically call some functions of a web service. ( Some of this functions required minutes to be...
2
by: suthakar | last post by:
Hai, In ASP.NET we Press F5 so that browser will open , and we close the browser and continue our program(task). But in my system after i close my browser debugging Doesnt stop. Then I have to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.