根据类名字符串创建实例
//先在声明TADeptForm 类的单元注册,或者选择在公共接口单元注册!
initialization;
RegisterClasses([TADeptForm]);
实现代码: