473,325 Members | 2,774 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,325 software developers and data experts.

How to pause ElapsedEventHandler

public void StartTimer()
{
System.Timers.Timer myTimer = new System.Timers.Timer();
myTimer.Interval =
Convert.ToDouble(ConfigurationSettings.AppSettings["Interval"]);
myTimer.Elapsed += new
System.Timers.ElapsedEventHandler(this.myTimer_Ela psed);
myTimer.Enabled = true;
}

protected void myTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs
e)
{
'**************************************** I need it to pause here

SeekFiles();

****************************************Then startup again here???
} // end function

--

David Fetrow
Helixpoint LLC.
da***@helixpoint.com
Nov 16 '05 #1
2 3007
How about Timer.Stop() and Timer.Start().

HTH;
Eric Cadwell
http://www.origincontrols.com
Nov 16 '05 #2
How about Timer.Stop() and Timer.Start().

HTH;
Eric Cadwell
http://www.origincontrols.com
Nov 16 '05 #3

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

Similar topics

0
by: Andrew | last post by:
When will .NET have a low-pause-time garbage collector A low-pause-time garbage collector would greatly improve .NET's ability to serve as a platform for soft real-time systems. It doesn't have...
11
by: Paminu | last post by:
Is there something like system("PAUSE") for linux?
8
by: Wim | last post by:
My GUI application starts a process (a console program) when the user hits Play. I would like to add an option to pause that process. The code I've added to detect if the user hit pause/unpause...
1
by: DaveF | last post by:
public void StartTimer() { System.Timers.Timer myTimer = new System.Timers.Timer(); myTimer.Interval = Convert.ToDouble(ConfigurationSettings.AppSettings); myTimer.Elapsed += new...
1
by: Max Adams | last post by:
Using System.Timers.ElapsedEventHandler to specify a method and and ElapsedEventArgs object I've trawled the internet looking for some help on this topic. What I want to do is, every x seconds...
38
by: Jackie | last post by:
I just want the programme to stop for a while. Thanks.
3
by: ginguene | last post by:
Its supposed to be a very simple program, with a class to display the updated current time every second (CAnalogTime) inside a Label in my form, using ElapsedEventHandler from System.Timers; The...
2
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. Is there a way to start, pause and resume a recurrsive search exactly where you left off, say in the registry programmatically? -- Michael Bragg,...
8
by: Lloydm | last post by:
I've used the command "pause" in batch files which works ok but I guess it's applied dirrently in c++. Using Dev C++ 4.0 and the following is my code #include<iostream> #include<iomanip>...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.