Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleMake a countdown program
Keywordscountdown, program
CategoriesUtilities
 
Use a Timer. When it fires, calculate the time until the alarm time and display it.
 
Private AlarmTime As Date

Private Sub Form_Load()
    AlarmTime = DateAdd("h", 2, Now)
End Sub

Private Sub Timer1_Timer()
Dim txt As String

    txt = Format$(AlarmTime - Now, "h:mm:ss")
    Label1.Caption = txt
End Sub
 
Formatted by Neil Crosby
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated