OnTimer Start Stop

Posted on 2006-05-19
Last Modified: 2013-11-20
I have an OnTimer function.  It is being started by me using SetTimer to a certain interval.  A Chunk of code happens when this timer goes off.  The problem I have is that what If I'm in a big chunk of code and I don't want the timer to go off in the middle of it.  How do you go about Pausing it and then Starting it up again?
Question by:cophi
    1 Comment
    LVL 48

    Accepted Solution

    All time when some message handler is active, other messages, including timer, are not handled (unless message handler does this). For example, try to write somr long loop in the button click event: all time loop runs, program doesn't response to mouse messages, doesn't redraw itself etc. Timer messages are not handled also. All messages in the message loop are handled after previous message handler finished.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
    Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now