SRDJAN DAKIC wrote in a message to ALL:
SD> Q: Is it possible to disallow Windows interrupting my
SD> program ?
SD> ----------------------------------------------------------
I don't know of a sure fire way.
SD> I need perfect timing for my program. For my Delphi
I can relate.
SD> will be the only task started in the enviroment. Is it
SD> possible to ensure that all data written (in cache) by
You might try having your program post a message to itself so the message is
at the bottom of the que. Then perform an application.processmessages.
Hopefully the message you just posted will be the last message processed.
When you receive it in your program you can be 'better' assured that windows
has been flushed.
In Delphi 2.0 you can also SendMessages to yourself instead of posting to the
que. You might utilize this somehow to help maintain windows undivided
attention.
My first method would be more suited at for the point in your program just
before the time critical point of your code is reached.
My second would bring any other windows programs to pretty much a screaching
halt.
I've never tried my second idea. The first though works real well; again
though it is no guarantee that more messages have been dumped on the que
right after you post your message.
Thanks,
Ryan
---
---------------
* Origin: Midnight Express, Fairlawn Ohio (1:157/110)
|