依据类名字符串创建实例

根据类名字符串创建实例//先在声明TADeptForm 类的单元注册,或者选择在公共接口单元注册!initializationR

根据类名字符串创建实例

//先在声明TADeptForm 类的单元注册,或者选择在公共接口单元注册!

initialization;   

RegisterClasses([TADeptForm]);


实现代码:

  with TFormClass(FindClass('TADeptForm')).Create(Application) do
  begin
  show;
  end;