Hallo peterbelow,
vielen Dank! So funktioniert es ohne Probleme!
Delphi-Quellcode:
procedure TFClient.IdThreadComponentRun(Sender: TIdThreadComponent);
var msgFromServer : string;
begin
// ... read message from server
msgFromServer := IdTCPClient.IOHandler.ReadLn();
// ... messages log
Display('SERVER', msgFromServer);
// ... Show Message in Windows Messages
TThread.Queue(nil, procedure
begin
ShowMessageInWindows('Server Message', msgFromServer);
end);
// ... AutoDisconnect
if msgFromServer = 'Goodbye Client ' then begin
btn_disconnectClick(nil);
end;
end;
Vielen Dank!
Patrick