//先在声明TADeptForm 类的单元注册,或者选择在公共接口单元注册!
initialization;
RegisterClasses([TADeptForm]);
实现代码:
with TFormClass(FindClass('TADeptForm')).Create(Application) dobegin
show;
end;
优势:
1.不需要引用调用的模块单元。
劣势:
1.需要传递其他入口参数时,此时得引用单元声明,优势就不存在了。
//先在声明TADeptForm 类的单元注册,或者选择在公共接口单元注册!
initialization;
RegisterClasses([TADeptForm]);
实现代码:
with TFormClass(FindClass('TADeptForm')).Create(Application) doend;
优势:
1.不需要引用调用的模块单元。
劣势:
1.需要传递其他入口参数时,此时得引用单元声明,优势就不存在了。