Type 
   Label1: TLabel;         //这里已经定义了Label1
TServerThread = class(TThread)
    private
      ADOConnection: TADOConnection;    protected
     procedure Execute; override;
    public
      Buffer:Array [1..2048] of Char;
      ServerUDP:TIdUDPServer;
      PeerInf:TPeerInfo;
      procedure ConnectDB();
      destructor Destroy;override;
  end;
===============================================================
procedure TMainForm.ServerUDPUDPRead(Sender: TObject; AData: TStream;
  ABinding: TIdSocketHandle);
  var
  buffer:Array[1..2048] of char;
  ServerThread:TServerThread;
  PeerInf:TPeerInfo;
begin
    try
    AData.ReadBuffer(buffer,Sizeof(AData));
    ServerThread:=TServerThread.Create(True);    //实例化一个服务线程
    ServerThread.ServerUDP:=ServerUDP;
    PeerInf.PeerIP:=ABinding.PeerIP;
    PeerInf.PeerPort:=ABinding.PeerPort;
    ServerThread.PeerInf:=PeerInf;
    CopyMemory(@(ServerThread.Buffer),@Buffer,AData.Size);
    ServerThread.Resume;
  except
  end;
end;
===================================================================
procedure TServerThread.Execute;
var
  ceType:char;
  CBLogin:TCBLogin;                     //数据结构
  CBLoginResult:TCBLoginResult;         //数据结构
  CBGetMyIPAndPort:TCBGetMyIPAndPort;   //数据结构
  CBPleaseCallMe:TCBPleaseCallMe;         //数据结构
  CBCalled:TCBCalled;                      //数据结构
  CBP2PResponse:TCBP2PResponse;          //数据结构
begin
  try
  ceType:=Buffer[1];    if ceType = ceLogin then
    begin
    CopyMemory(@CBLogin,@Buffer[2],SizeOf(CBLogin));
     Label1.Caption:=CBLogin.LoginName;        //这句提示我没有定义Label1
   // MessageBox(Handle,CBLogin.Password,'提示',MB_ICONINFORMATION);
    end;
=========================================================================
说明:以上代码是我从一个delphi 关于通信编程方面的demo中copy下来,学习的过程中遇到的.
问题: 1 TServerThread.Execute 的调用是在 ServerThread:=TServerThread.Create(True);    {实例化一个服务线程   } 中实现的吗? 
      2 为什么在 TServerThread.Execute中不能调用 窗体控件
      3 如果我要根据ceType 的传入值,进行具体的操作.比如查询数据库,返回用户具体信息.我又该如何在这个execute中来进行.关键是她现在访问不了在TServerThread.Execute外定义的一些控件
      4 在Label1.Caption:=CBLogin.LoginName;  这句中,我用CBLogin.LoginName能不能接收到登陆的用户名,书写是否正确?
============================================================================
ps: 先谢谢路过的朋友
   我的联系方式: QQ  24578574
                Msn:   [email protected]
   请朋友帮帮忙,给指点一下.