Board index » delphi » Blocking of messages

Blocking of messages

J'm writting an client-server application in Borland Delphi 5.0 and J'm
using components ClientSocket and ServerSocket for communication beetween
clients and server. Programs seemed to work smoothly, but suddenly I noticed
something strange in server app.:

-when appeared one after another two events OnClientRead during I was
resizing or moving the server window, the program hunged up and stopped
reacting for the user interface !

Maybe will help ProcessMessages() , but I don't know where to insert the
call. Probably not into every event in Object Inspector ? Maybe it is due to
redefine  message loop ?

George

 

Re:Blocking of messages


if you are using an Indy blocking component directly in the main app thread
(ie slapped n a form) then it will "freeze" until its done ... two
solutions:

(1) Just drop a TIdAntiFreeze (in the MISC tab) on any form - this tells
Indy to process messages for you and gives you back the ability tomove about
etc.

(2)Write everything in threads

/A.

Quote
"George" <ro...@poczta.onet.pl> wrote in message news:3b3e400a_1@dnews...
> J'm writting an client-server application in Borland Delphi 5.0 and J'm
> using components ClientSocket and ServerSocket for communication beetween
> clients and server. Programs seemed to work smoothly, but suddenly I
noticed
> something strange in server app.:

> -when appeared one after another two events OnClientRead during I was
> resizing or moving the server window, the program hunged up and stopped
> reacting for the user interface !

> Maybe will help ProcessMessages() , but I don't know where to insert the
> call. Probably not into every event in Object Inspector ? Maybe it is due
to
> redefine  message loop ?

> George

Other Threads