[DUG] Why does this hang?

Ross Levis ross at stationplaylist.com
Thu Jul 28 23:09:16 NZST 2011


I'm using the following code inside a wait loop so that most messages are
processed except for some mouse and keyboard messages (I think) which I
don't want to be processed.  It's working perfectly here but for another
user it hangs indefinitely.

 

If PeekMessage(Msg, MainForm.Handle , 0, 0, PM_NOREMOVE) and

((Msg.message < 160) or ((Msg.message > 264) and (Msg.message < 512))

or (Msg.message > 524)) then

   Application.HandleMessage;

 

I use to have an Application.ProcessMessages but this was causing a problem
which I can't remember now, and this code fixed it.

 

Cheers.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110728/66858ef4/attachment.html 


More information about the Delphi mailing list