popup form in indy thread

Giganews Newsgroups
Subject: popup form in indy thread
Posted by:  John Smith (thecod…@163.com)
Date: Tue, 11 May 2004

I have an Indy 9 TcpServer listen for command,When it get a command,it
pops up a form which has a frame in it,and there are a TRichEdit,a
TComboBox,a TComboBoxEx,two TLabel and a TButton control in the
frame.when the form pops up,only TComboBoxEx and two TLabels
displayed,all other controls disapeared,why?the form pops up in
TIdTCPServer.Execute method.thanks.

procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
var
  Command : string;
begin
  with AThread.Connection do
  begin
    Command := ReadLn;
    if (Command = 'Message') and Assinged(MessageForm) then
         MessageForm.Show;
  end;
end;

Replies