我得程序是:
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
ch:integer;
begin
ch:=messagedlg('Are you sure exit?',mtconfirmation,[mbYes,mbNo],0);
if ch=mrNo then exit
else if ch=mrYes then
begin
Application.Terminate;
end;
end;
我点击'否'时,系统还是退出,为什么?有何办法?
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
ch:integer;
begin
ch:=messagedlg('Are you sure exit?',mtconfirmation,[mbYes,mbNo],0);
if ch=mrNo then exit
else if ch=mrYes then
begin
Application.Terminate;
end;
end;
我点击'否'时,系统还是退出,为什么?有何办法?
解决方案 »
- 请大家看看我的MAP文件看看我的程序哪行出错了
- edit.text:=[00075]AA 我要取75要用哪几个函数啊
- 哪里有关于delphi7中报表设计的书籍下载?
- 关于遍历控件的一个简单问题!八小时内在线
- ★ 请问 Access 数据库支持事务保护吗?
- 来csdn半年了,看了很多帖子,到现在我有一些问题,我搞不懂!
- 如何实现把多个bmp文件生成一个多页的tif文件?
- 急~~~~~关于Delphi的数据的插入
- 高手救我!关于DCOM三层:在客户端应用服务器能连上,但服务启动不了(如取得服务器机器上的别名),why?请进->
- 我记得有一个专门做form的控件(可以根据图片生成from)请问那里下载,不是1st3000,谢谢
- 一个超菜问题!!??
- 我是一个初学者,何处有好的delphi编程技巧的网站啊,介绍几个.
begin
if application.messagebox('您确定要退出工程管理系统吗?','系统提示',mb_yesno+mb_iconquestion)=id_yes then
begin
//Endlogin;//修改操作员登录历史数据
canclose:=true;
end
else
begin
canclose:=false;
end;
end;我是这么写的,
var
ch:integer;
begin
ch:=messagedlg('Are you sure exit?',mtconfirmation,[mbYes,mbNo],0);
if ch=mrNo then canclose:=false
else if ch=mrYes then
begin
Application.Terminate;
end;
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
ch:integer;
begin
ch:=messagedlg('Are you sure exit?',mtconfirmation,[mbYes,mbNo],0);
if ch=mrNo then Action := caFree {修改的语句}
else if ch=mrYes then
begin
Application.Terminate;
end;
end;
if ch=mrNo then Action := caFree {修改的语句}???