Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Dec : Re: closing an application over the network
| Subject: | Re: closing an application over the network |
| Posted by: | "soonic" (xxsoon..@op.pl) |
| Date: | Fri, 21 Dec 2007 21:02:03 |
>
> The main problem I noticed is that I get this procedure below called
> (which I had mentioned before regarding the already solved problem with
> app terminate)
>
> procedure TMainForm.Terminate;
> begin
> //Application.Terminate;
> end;
>
> As I said that FromShow works perfect when my application starts normally
> (not to tray ).
procedure TReadingThread.Execute;
begin
try
while not Terminated do
begin
Fd.ReadFrom(Cc);
if not Terminated then Synchronize(Data); // I chceked: the
exception on here
end;
except
Synchronize(MainForm.Terminate);
end;
end;
When I use 'Postmessage' then the line 'Synchronize(MainForm.Terminate);'
fires up. I don't get this when client application starts normally with
FormShow. When the client is connected to server then the server sends some
packets of data (like 3 or 4), and only the first one gets to the client.
There is a problem with this message handler which I use because my
application works fine if it doesn't start from tray and doesn't use msg
handler.
I Can't find out what's wrong with it. Do you have any solution?