例如使用var := 'TFrom'.create( nil )来创建对象,谢谢。

解决方案 »

  1.   

    用类中类呀:  type  ClassForm = class of TForm;YouFunc (classVar: ClassForm)
    Var
      frm: TForm;
    begin
      frm := classVar.Create;
    end;
      

  2.   

    http://community.csdn.net/Expert/topic/3076/3076295.xml?temp=.8679773
      

  3.   

    谢谢了。我是一个初学者,从来没有见class of这种用法,也没有听过类中类的说法,所以谢谢你了。
      

  4.   

    asj
    别笑别人,每个人都有自己不知道的东西,每个人都有不小心错的时候,如果你第一个把答案告诉我,我就把分给你了,不过还是感谢你关注我的问题。我更感谢lFindit告诉我了解决的方法,谢谢。