H
houtor
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.butonn1Click(Sender: TObject);
var
fcType : TFormClass;
f : TForm;
frmname:string;
begin
FrmName := 'TForm2';
try
fcType := TFormClass(FindClass(frmname));
application.CreateForm(fctype,f);
f.Showmodal;
f.Free;
except
ShowMessage('不存在FORM,请注册');
end;
end;
然后还要
initialization
RegisterClass(TForm2);
但不知道这个语句放在什么位置?
var
fcType : TFormClass;
f : TForm;
frmname:string;
begin
FrmName := 'TForm2';
try
fcType := TFormClass(FindClass(frmname));
application.CreateForm(fctype,f);
f.Showmodal;
f.Free;
except
ShowMessage('不存在FORM,请注册');
end;
end;
然后还要
initialization
RegisterClass(TForm2);
但不知道这个语句放在什么位置?