Steve said:
To be fair to the OP, I doubt he's actually planning it. He just wants
to know what would happen should such a situation arise.
You're right that there is nothing wrong with just wondering.
Won't it just queue the relevant windows messages (timer events) against
the application? I'm not sure what happens if the message queue gets
longer and longer - presumably the OS will handle it by reporting the
application as "Stopped responding". Is that correct?
SteveT
There are just a lot of possible scenarios here ranging from benign to fatal. I
would hope the OP try some of them, with variations. You learn so much from
untangling the resulting mess and understanding what happened for yourself.
"When in doubt, ask the machine."
Consider the case where you use up an interval's worth of time (without
disabling the timer during processing) and then yield to the OS via DoEvents().
Your pending next timer event will be fired before your current one has
finished. Now your handler has just become re-entrant whether or not it was
written to be plus you are heading for an eventual stack overflow.
Or on the other hand, suppose you disable the timer on entry to the handler and
don't re-enable it until exit. There may be no noticeable bad effect at all,
but your app will be missing some of those interval boundaries it supposedly
cares about. Q: How bad is that? A: "It depends."
-rick-