Click here to Skip to main content
15,915,076 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi..
i am working in timer in window c# and using random function()
i want my random function() call on only six time in one hours
Posted

If the random function given in the question is to be called 6 times at equal intervals in an hour then I think the Tick event of the Timer class explained here
http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.aspx[^]
can be used by setting the Interval property explained here
http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.interval.aspx[^] as below
C#
myTimer.Interval = 600000;
 
Share this answer
 
Comments
Mehdi Gholam 28-Apr-12 2:34am    
My 5!
VJ Reddy 28-Apr-12 2:54am    
Thank you, Mehdi.
Hi ,
Set interval every 10 min\
C#
private void Form1_Load(object sender, EventArgs e)
      {
          timer1.Interval = 600000;
          timer1.Start();
      }

Best Regards
M.Mitwalli
 
Share this answer
 
Comments
Member 8847418 28-Apr-12 2:38am    
thank you friends
Mohamed Mitwalli 28-Apr-12 4:44am    
your welcome

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