首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

为什么会错呢?Undeclared identifier: 'FormCloseQuery',该如何解决

2012-02-11 
为什么会错呢?Undeclared identifier: FormCloseQuery我检查了N次了,应该没错的呀!请高手帮我看看好吗?

为什么会错呢?Undeclared identifier: 'FormCloseQuery'
我检查了N次了,应该没错的呀!请高手帮我看看好吗?
原代码:
unit   Unit1;

interface

uses

  Windows,   Messages,   SysUtils,   Variants,   Classes,   Graphics,   Controls,   Forms,

  Dialogs,   StdCtrls;

type

  TForm1   =   class(TForm)
        Label1:   TLabel;
        Label2:   TLabel;
        Label3:   TLabel;
        Label4:   TLabel;

  private

{   Private   declarations   }

procedure   QueryEndSession(var   Msg:TMessage);Message   WM_QueryEndSession;

  public

{   Public   declarations   }

  end;


var

  Form1:   TForm1;

implementation

{$R   *.dfm}


procedure   TForm1.QueryEndSession(var   Msg:TMessage);

begin

Msg.Result:=0;

end;
procedure   TForm1.FormCloseQuery(Sender:   TObject;   var   CanClose:   Boolean);
begin
application.Minimize;
Tray.InstIcon(application.Icon,self.Handle,0);
end;
end.


[解决办法]
type

TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);//这个FormCloseQuery定义哪里去了?加上这个就好了

private

热点排行