Results 1 to 6 of 6

Thread: Timer control in .Net / Silverlight

  1. #1
    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.

  2. #2
    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;
            )

  3. #3
    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?

  4. #4
    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.)

  5. #5
    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;
            )

  6. #6
    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.

Similar Threads

  1. Sharepoint (MOSS) timer jobs and the timer service
    By MahaGuru in forum Office Setup
    Replies: 2
    Last Post: 01-03-2011, 08:38 AM
  2. How to refresh an image control in Silverlight
    By NAKKIRAN in forum Windows Software
    Replies: 4
    Last Post: 13-12-2010, 06:41 PM
  3. Embedding Silverlight 4 control in a web page
    By Laskar in forum Software Development
    Replies: 6
    Last Post: 05-08-2010, 08:56 AM
  4. how VIBlend DataGrid for Silverlight is the most flexible control
    By Aandaleeb in forum Software Development
    Replies: 4
    Last Post: 28-01-2010, 12:31 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,637,990,153.89326 seconds with 17 queries