请教,能否获得任意应用程序窗体中的某个控件值?(100分)

  • 主题发起人 主题发起人 2501
  • 开始时间 开始时间
2

2501

Unregistered / Unconfirmed
GUEST, unregistred user!
比如OICQ中的“发送消息”窗体或者“察看消息”窗体,要获取该窗体中显示的“ID值”或者是
“昵称”值,或者是“email地址”该如何做?谢谢!
 
想法不错实现很难
 
屏幕取词?
 
API函数GetWindowText就可以
 
部分程序:
i:=-1;
while i<=FormName.ComponentCount-1 do
begin
if (i=-1) then c:=FormName
else c:=FormName.Components;
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);
 
getwindowtext好像只能够取得窗体的caption,其中的具体值取不到的。
 
接受答案了.
 
后退
顶部