program pTest;{$R *.res}uses
Forms,
uGameDisplay in '..\Source\uGameDisplay.pas';var
GameForm: TGameForm;
begin
Application.Initialize;
Application.CreateForm(TGameForm, GameForm);
Application.Run;
end.
-------------------------------------------------------------------------//这个是新建一个unit,然后自己写代码,不是新建一个Form自动生成的
Unit uGameDisplay;InterfaceUses Forms;Type
TGameForm = Class(TCustomForm) Protected Public
End;Implementation
End.----------------------------------这样运行的时候出EResNotFound的错误TForm 的子类必须通过IDE新建Form吗?dmf 是必须的吗,里面的内容只是一些属性的设置而已
Forms,
uGameDisplay in '..\Source\uGameDisplay.pas';var
GameForm: TGameForm;
begin
Application.Initialize;
Application.CreateForm(TGameForm, GameForm);
Application.Run;
end.
-------------------------------------------------------------------------//这个是新建一个unit,然后自己写代码,不是新建一个Form自动生成的
Unit uGameDisplay;InterfaceUses Forms;Type
TGameForm = Class(TCustomForm) Protected Public
End;Implementation
End.----------------------------------这样运行的时候出EResNotFound的错误TForm 的子类必须通过IDE新建Form吗?dmf 是必须的吗,里面的内容只是一些属性的设置而已
begin
GlobalNameSpace.BeginWrite;
try
CreateNew(AOwner);
if (ClassType <> TForm) and not (csDesigning in ComponentState) then
begin
Include(FFormState, fsCreating);
try
if not InitInheritedComponent(Self, TForm) then
raise EResNotFound.CreateFmt(SResNotFound, [ClassName]);
finally
Exclude(FFormState, fsCreating);
end;
if OldCreateOrder then DoCreate;
end;
finally
GlobalNameSpace.EndWrite;
end;
end;