求助delphi高手~谢谢了~

来源:百度知道 编辑:UC知道 时间:2024/05/14 01:58:45
procedure TParent.FormClos(Sender: TObject; var Action: TCloseAction);
begin
action:=cafree;
end;

代码中有一段这个

为什么出现错误是
Undeclared indentifier:'FormClose'
和';'expected but')'found

~~~求助求助 谢谢谢谢~~
.. = = 这个 刚才发的时候不小心删掉了 +了e也是不对的。。

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=cafree;
end;

看看是不是程序结尾的“end.”被生成的代码给切开了,delphi有时候会有这种小毛病

你在最开始的时候没有定义吧,就是在最开始的函数实体声明那里先声明一下

在这里 procedure TParent.FormClos(e) 加个e啊 你试下就行了