OnTimer Start Stop

Posted on 2006-05-19
Medium Priority
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

AlexFM earned 2000 total points
ID: 16717956
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.

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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. …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month16 days, 3 hours left to enroll

850 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