比如OICQ中的“发送消息”窗体或者“察看消息”窗体,要获取该窗体中显示的“ID值”或者是
“昵称”值,或者是“email地址”该如何做?谢谢!

解决方案 »

  1.   

    //look at this
         i:=-1;
         while i<=FormName.ComponentCount-1 do
         begin
              if (i=-1) then c:=FormName
              else c:=FormName.Components[i];
              cap:='';
              if (c is TLabel) then cap:=(c as TLabel).Caption
              else if (c is TForm) then cap:=(c as TForm).Caption
              else if (c is TButton) then cap:=(c as TButton).Caption
              else if (c is TGroupBox) then cap:=(c as TGroupBox).Caption
              else if (c is TRadioGroup) then cap:=(c as TRadioGroup).Caption
              else if (c is TTransparentButton) then cap:=(c as TTransparentButton).Caption
              else if (c is TBitBtn) then cap:=(c as TBitBtn).Caption
              else if (c is TDBGrid) then ChangeDBGrid(c as TDBGrid);