delphi xe10.3.3,devexpress19.2,TdxRibbonForm
用classname动态创建一个TdxRibbonForm,出现错误提示“class TformBase not found”
unit uBase;
type
TFormBase = class(TdxRibbonForm)
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormBase: TFormBase;
implementation
{$R *.dfm}
procedure TFormBase.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=caFree;
end;
initialization
begin
registerclasses([TFormBase]);
end;
end.
procedure TFormMain.TabMainBarItemNewClick(Sender: TObject);
var
LFormClass: TdxFormClass;
ff:tdxform;
begin
LFormClass := TdxFormClass(FindClass('TFormBase')); //出现错误提示“class TformBase not found”
ff:=LFormClass.Create(Application);
ff.Show;
end;
运行时,录入"tformbase",创建并显示从TdxRibbonForm继承下来的窗体。
怎么解决?