如题。

解决方案 »

  1.   

    var
    i:integer;
    begin
    try
    i=tcontrol(object).left;
    except
    on e:exception do
    begin
    object is not visual control;
    end;
    end;
      

  2.   

    从Twincontrol继承下来的类全都是控件,从Twincontrol继承的类都是组件   所以可以:   if object is Twincontrol then
                        showmessage('object is visual control');
      

  3.   

    begin
     for  i:=0 to ComponentCount-1 do
     begin
       if  GetPropInfo(Components[i].ClassInfo,'visible')<>nil  then
       ShowMessage(Components[i].ClassName);
     end
    end;
      

  4.   

    >>从Twincontrol继承下来的类全都是控件,从Twincontrol继承的类都是组件label你能判断 出来吗?呵呵
      

  5.   

    控件(TControl)本身就是可视的,贴中用“可视元件(TComponent)”恰当些if X is TControl then { TODO };
      

  6.   

    呵呵,提醒老大一下:TComponent是TControl 的父类