using the timer in C# for periodic check events? -


dear brothers i'm new comer , using xml database , want retrieve method fetches data label control @ every 10 seconds using timer control in c#.

for instance method retrieves data , timer control is:

private void timer1_tick(object sender, eventargs e)         {           //here how can run method @ every 10 seconds                       returnuknowns();         } 

if have problems creating timer. execute function every 10 seconds need specify tick period when creating timer.

timer timer = new timer(10000); // 10 seconds in miliseconds timer.tick += timer1_tick; 

and somwhere need set

timer.start()  private void timer1_tick(object sender, eventargs e) {            //here how can run method @ every 10 seconds              returnuknowns(); } 

then each 10 seconds function timer1_tick() called , functions specified in it. timer.tick may have different name based on type of project on.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -