此处的句柄请不要用另一个程序中的控件句柄!就算用了,也找不到控件!
procedure TForm1.Button1Click(Sender: TObject);
begin
if FindControl(StrToIntdef(Edit1.Text,0))<>nil then
ShowMessage(FindControl(StrToIntdef(Edit1.Text,0) ).Name)
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Text :=IntToStr(Self.Handle);
end;