Results 1 to 2 of 2

Thread: Timer on Windows 98 fails

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Europe
    Posts
    52

    Question

    Hi,

    I've written a small application which uses a timer.
    The timer function compares values every 10ms, for like 5 seconds.
    The problem is that when running NT/Win2000, the timer runs correctly. When running Win98 however, the timer does not stop after 5 seconds, it ignores the .Enabled=false. Is there anything specific I should use or do in order to get it to work on all of the above platforms?

    Thanks,

    Dirk
    Tell me, and I will forget. Show me, and I will remember. Involve me, and I will care.

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    try this:

    Private mTimerEnabled as boolean

    Private Sub Timer1_Timer()
    If not mTimerEnabled then exit sub
    ' ...
    ' do stuff here
    ' ...
    End Sub

    when you disable the timer, use
    Timer1.Enabled = false
    mTimerEnabled = false

    to enable it:
    Timer1.Enabled = true
    mTimerEnabled = true
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

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