怎样在Form的OnClose事件中是OnClose事件失效?(50分)

P

PigDong

Unregistered / Unconfirmed
GUEST, unregistred user!
就是单击窗体右上角的关闭按钮,怎样是他失效!不能把按钮去掉
 
在FormCloseQuery事件中加上 CanClose:=false;
 
Action:=caFree;
 
写下:
action:=canone;
 
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
application.Run;
end;
你试试
 
接受答案了.
 
1、先定义一个全局变量:var a:boolean;2、在onclose中写:
s:=false;
if s then close();
3、在窗体上放一按钮,名为关闭!Onclick中写:
s:=true;
if s then close();
 
顶部