Results 1 to 5 of 5

Thread: Difference between System.Timers.Timer and System.Windows.Forms.Timer?

  1. #1

    Thread Starter
    Frenzied Member Icyculyr's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    1,934

    Difference between System.Timers.Timer and System.Windows.Forms.Timer?

    Hey, I'm wondering what exactly is the difference System.Timers.Timer and System.Windows.Forms.Timer???

    Kind Regards

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Difference between System.Timers.Timer and System.Windows.Forms.Timer?

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member Icyculyr's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    1,934

    Re: Difference between System.Timers.Timer and System.Windows.Forms.Timer?

    Thanks, I read some of it, doesn't appear to be anything relevant to me, interesting to know the Windows.Forms.Timer is only accurate to 55ms though o_O

    Kind Regards

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Difference between System.Timers.Timer and System.Windows.Forms.Timer?

    The main point to note is that the WinForms Timer is single-threaded, i.e. it raises its Tick events on the UI thread, where the Timers.Timer raises its Elapsed events on a thread pool thread by default. As such, the WinForms Timer is good for just updating the UI or quick calculations but anything that will take time is best done with a Timers.Timer.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Frenzied Member Icyculyr's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    1,934

    Re: Difference between System.Timers.Timer and System.Windows.Forms.Timer?

    I see, thanks a lot jm.

    Kind Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width