Click here to Skip to main content
15,900,461 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want to use the timer control in the c# so suggest me in which way i can use the timer in my program.
Posted
Comments
OriginalGriff 23-Nov-13 5:13am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Perhaps if you were to tell us what you are going to do with the timer, or even what your application is supposed to do, it might help?
Use the "Improve question" widget to edit your question and provide better information.
Try some examples by searching on Google.

actually timer is used to do work in specific intervals in back end while you can do your other work.It can be used to load huge amount of data while working on the form simultaneously.
 
Share this answer
 
Use the Timer class[^].
 
Share this answer
 
HI
if u r working on windows application..
this code will work....

C#
System.Timers.Timer timer = new System.Timers.Timer(1000); // 10 seconds
       private void Form1_Load(object sender, EventArgs e)
       {

           timer.Elapsed += timer_Elapsed;

           timer.Enabled = true;

       }

       void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
       {
           timer.Enabled = false;
           MessageBox.Show("time out");

       }
 
Share this answer
 
Definitely you need less time than posting such a lazy question here! Here are MSDN[^]and Google[^], you will find tons of example there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900