Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Timer control in .Net / Silverlight

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 05-08-2010
Member
 
Join Date: Mar 2010
Posts: 372
Timer control in .Net / Silverlight
  

Hello,
So far, I've always programmed with Visual Basic, and at the time I get around to C #. My IDE is Microsoft Visual Studio 2008 and .NET Framework 3.5. Currently I have the big problem that I want to install a timer, but it does not currently, since no control can be found. Apparently that is so incorrect. So Google had engaged to find me a solution. When I thought it was useful was an error. Can you guys help me with this? Thank you.

Reply With Quote
  #2  
Old 05-08-2010
Member
 
Join Date: Nov 2009
Posts: 343
Re: Timer control in .Net / Silverlight

Check out if this code can help you
Code:
private void Timer Tool ()
        (
            System.Timers.Timer tm = new Timer ();
            tm.Interval = 1000;
            tm.Elapsed + = new ElapsedEventHandler (tm_xp);
            tm.Enabled = true;
            tm.start ();
        )

        private void tm_xp ()
        (
            time + = 1;
            label1.Content = time;
        )
Reply With Quote
  #3  
Old 05-08-2010
Member
 
Join Date: Mar 2010
Posts: 372
Re: Timer control in .Net / Silverlight

The "new ElapsedEventHandler," in line 5 is marked as an error. This message is recorded in the error-Windows .
Code:
No overload for 'timer_Elapsed agrees "with the delegates' System.Timers.ElapsedEventHandler match.
I'm still in it:
Code:
using system.time;
Can you help me with this?
Reply With Quote
  #4  
Old 05-08-2010
Member
 
Join Date: Mar 2010
Posts: 197
Re: Timer control in .Net / Silverlight

Perhaps it would be better if timer from system.time namespace to not use the, but from the System.Windows.Forms and for the WPF Dispatcher-timer. (But I do not know because I work with WinForms from NET 2.0 only.)
Reply With Quote
  #5  
Old 05-08-2010
Member
 
Join Date: Nov 2009
Posts: 356
Re: Timer control in .Net / Silverlight

I think you should include this part of the code
Code:
   private void tm (Object snd, ElapsedEventArgs e)
        (
            time + = 1;
            lb.Content = time;
        )
Reply With Quote
  #6  
Old 19-08-2010
Member
 
Join Date: Aug 2010
Posts: 55
Re: Timer control in .Net / Silverlight

It is now, but once a new problem or no problem but a question. But since it is topic-this, I do like a new thread. So thanks for the help it works now.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Timer control in .Net / Silverlight"
Thread Thread Starter Forum Replies Last Post
Sharepoint (MOSS) timer jobs and the timer service MahaGuru Office Setup 2 01-03-2011 09:08 AM
How to refresh an image control in Silverlight NAKKIRAN Windows Software 4 13-12-2010 07:11 PM
Embedding Silverlight 4 control in a web page Laskar Software Development 6 05-08-2010 09:26 AM
how VIBlend DataGrid for Silverlight is the most flexible control Aandaleeb Software Development 4 28-01-2010 01:01 AM


All times are GMT +5.5. The time now is 02:28 AM.