Error CanClose

Hint: Start of reading config file C:\lazarus\fpc\2.4.0\bin\i386-win32\fpc.cfg
Hint: End of reading config file C:\lazarus\fpc\2.4.0\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.4.0 [2010/07/19] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Win32 for i386
Compiling project1.lpr
Compiling unit1.pas
unit1.pas(29,24) Hint: Parameter "Sender" not used
unit1.pas(28,27) Hint: Parameter "Sender" not used
unit1.pas(26,30) Hint: Parameter "Sender" not used
unit1.pas(91,17) Error: Identifier not found "CanClose"
unit1.pas(201) Fatal: There were 1 errors compiling module, stopping