Sponsor our site Greater New Orleans .NET User Group (GNONUG) "KNOW .NET"
      Programming    Blogs    Data    Tool    Visual Studio.NET    C#    Other    .NET Framework    .NET Components    ADO.NET    Utility

GNONUG
Mission
Events
Discuss
Resource
Support
Links
Training



The Timer Interval property behaves differently in VB .NET

Posted by on Thursday, February 19, 2004 (PST)

The Timer Interval property behaves differently in VB .NET

The Timer Interval property behaves differently in VB .NET (VB .NET)

In VB 6, you could turn the Timer control on by setting the Interval property value to a number greater than 0 and you could turn it off by setting the value to 0, like so:

Timer1.Interval = 60
Timer1.Interval = 0

VB .NET will throw and exception if you set the Interval property to a value less than 1. To turn the Timer component on and off, you must use the Enabled property as shown below:

Timer1.Enabled = True
Timer1.Enabled = False

One other small note about the Timer Interval property, the maximum value is no longer 65,535 milliseconds. The .NET Timer can tick for more than 2.1 billion milliseconds (the maximum integer value). So if you have some reason for an application to wait a few weeks, the new .NET Timer should suit your needs just fine.


Add Your Comment


vblg.XOCOMP.NET
The successful people are the ones who can think up things for the rest of the world to keep busy at. -- Don Marquis

 

New Events

  • July 2010 GNONUG Meeting
    Patrick LeBlanc
    Profiling Your DB
    Tuesday, July 13, 2010 6:30pm
    New Horizons New Orleans


  • July GNONUG Meeting
    Steve Andrews will be our guest presenter on Monday, July 13 from 6:30 pm - 9:00 pm. This event is open to anyone interested in .Net.

  • (Speaker Idol) June BRDNUG .Net User
    Sponsored by: Sparkhound

    SPEAKER IDOL Format
    1. 5 speakers.
    2. 15 minutes each.
    3. 3 Grueling judges (Billy Jacobs, Jon Dalberg, Mike Huguet)
    4. Audience will choose the winner.
    5. Great prizes!

    Agenda
    5:45 pm - 6:15 pm: General Introduction/Food and Drinks
    6:15 pm - 7:30 pm: The Competition Will Begin
    7:30 pm - until: Open forum for questions



  •  

    New Posts

  • SharePoint admin/developer
    Posted by md3 on Sunday, April 04, 2010 (PST)

  • Baton Rouge .NET positions
    Posted by md3 on Wednesday, June 24, 2009 (PST)

  • Access
    Posted by md3 on Wednesday, September 19, 2007 (PST)


  •  
    Greater New Orleans .NET User Group "KNOW .NET" GNONUG