CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2000
    Posts
    47

    setting timer to one hour

    how do i set a timer to one hour.

    the following code does not work

    Private sub cmdTime_click
    while count =< 600
    timer.enabled = true
    count = count + 1
    wend
    End Sub




  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: setting timer to one hour

    Option Explicit

    Private Sub Command1_Click()
    Label1 = Now
    Timer1.Interval = 60000
    Timer1.Enabled = True
    End Sub

    Private Sub Timer1_Timer()
    Static X
    X = X + 1
    If X = 60 Then
    Beep
    Label2 = Now
    Timer1.Enabled = False
    End If
    End Sub


    John G

  3. #3
    Join Date
    May 2000
    Posts
    47

    Re: setting timer to one hour

    thank you, John.

    it works!.

    i wonder why my first coding (using while..wend) did not work.

    usin.



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

Featured