我也有同样的问题。如果是从自建的控件。在控件的create中加入
{if aowner is tform then
//showmessage(inttostr(tform(aowner).componentcount));
begin
for it:=0 to tform(aowner).componentcount-1 do
begin
if (tform(aowner).components[it] is ttable ) then // and ((tform(aowner).components[it]).tag=111) then
begin
id:=ttable(tform(aowner).components[it]).tablename; //tform(aowner).components[it].text;
showmessage(id);
end;
end;
end; }
如果窗体上有table.等不可见的控件。就找不到它们。有谁知道呀//