Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

* * * * * 1 votes

CountDown timer Class in VB.Net

timer countdown countdown timer

  • Please log in to reply
50 replies to this topic

#49 buda56


    CC Lurker

  • Just Joined
  • Pip
  • 2 posts
  • Programming Language:C#, (Visual) Basic, JavaScript, Visual Basic .NET, VBScript
  • Learning:Perl, Ruby

Posted 26 June 2012 - 02:59 PM

Imports System.Windows.Forms at the top of your Countdown Class.

This is how I used it in my program (VB.Net)

*** Set Logout timer interval and add Handlers for the Logout Timer
_logoutTimer = New CountDown(0, 1)
AddHandler _logoutTimer.Tick, AddressOf _logoutTimer_Tick
AddHandler _logoutTimer.TimesOut, AddressOf _logoutTimer_End

The only thing I can see is that you use the variable "Time" isn't this a reserved word?? Try renaming that variable to something else?

  • 0

#50 UndeathlyShadow


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts
  • Location:Berlin
  • Programming Language:(Visual) Basic, Visual Basic .NET, Transact-SQL, VBScript, Others
  • Learning:(Visual) Basic, Visual Basic .NET, Transact-SQL, VBScript, Others

Posted 29 July 2012 - 05:39 AM


nice class thanks for that, that saves me a lot of time...

Is there a possibility to check that the timer is running?
I want to implement a button that needs to know the status of the Timer
e.g.: if timer_running = true then ....
  • 0

#51 OneT


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts
  • Programming Language:C
  • Learning:C

Posted 11 January 2013 - 06:50 PM

thank you very much very nice class countdown
  • 0

Also tagged with one or more of these keywords: timer, countdown, countdown timer

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download