27623 total geeks with 3538 solutions
Recent challengers:
 Welcome, you are an anonymous user! [register] [login] Get a yourname@osix.net email address 

Articles

GEEK

User's box
Username:
Password:

Forgot password?
New account

Shoutbox
nardunodarr
[b]<a href="http:/ /www.wngzx.c om/">swiss rep<strong>< a href="http:/ /www.wngzx.c om/">swiss replica watches aaa+</a></st rong> <br> <strong><a href="http:/ /www.wngzx.c om/">swiss replica watches</a>< /strong> <br >
nardunodarr
[b][url=http ://www.wngzx .com/]swiss replica<stro ng><a href="http:/ /www.wngzx.c om/">swiss replica watches aaa+</a></st rong> <br> <strong><a href="http:/ /www.wngzx.c om/">swiss replica watches</a>< /strong> <br >
nardunodarr
<ul><li><str ong><a href="http:/ /www.wngzx.c om/">watches </a></strong > </li><li>< strong><a href="http:/ /www.wngzx.c om/">watches </a></strong > </li><li>< strong><a href="http:/ /www.wngzx.c om/">swiss Mechanical movement replica watches</a>< /strong> </l i></ul><b
nardunodarr
[b][url=http ://www.nanta blog.com/]sw iss replic<stron g><a href="http:/ /www.nantabl og.com/">swi ss replica watches aaa+</a></st rong> <br> <strong><a href="http:/ /www.nantabl og.com/">swi ss replica watches</a>< /strong> <br >
nardunodarr
[b][url=http ://www.mr-ha le.com/]monc ler <strong><a href="http:/ /www.mr-hale .com/">moncl er sale</a></st rong> <br> <strong><a href="http:/ /www.mr-hale .com/">moncl er outlet store</a></s trong> <br>

Donate
Donate and help us fund new challenges
Donate!
Due Date: Aug 31
August Goal: $40.00
Gross: $0.00
Net Balance: $0.00
Left to go: $40.00
Contributors


News Feeds
The Register
US trade watchdog
rejects patent
infringement claim
against Microsoft
Astroboffins clock
TWO HUGE BLACK
HOLES inside
quasar-hosting
galaxy nearest to
Earth
Jeep Cherokee 2.2:
Capable,
comfortable ... but
just not very Jeep
Uber pulls up to
the bumper, ropes
in Jeep hackers
Black and blue: The
rise of the riotous
Richard Pryor
FORKING BitcoinXT:
Is it really a coup
or just more
crypto-FUD?
Company in
shambles, marriages
ruined. My work
here is done, says
Ashley Madison CEO
Baltimore lawyers
vow to review 2,000
FBI Stingray snoop
cases
Associated Press
sues FBI for
impersonating its
site to install
spyware
Drum roll, please
.... Results are in
for the collective
noun for security
vulns
Slashdot
Malaysia Blocking
Websites Based On
Political Content
Do We Need More
Emojis?
New Horizons" New
Target: Kuiper
Belt Ice Chunk 2014
MU69
MIAOW Open Source
GPU Debuts At Hot
Chips
Cliff Bleszinski"s
Boss Key
Productions Unveils
LawBreakers> Game Trailer
Abusing Symbolic
Links Like It"s
1999
Germany Wants
Facebook To Obey
Its Rules About
Holocaust Denial
Kristian von
Bengston"s New
Goal: The Moon
The View From 2015:
Integrated Space
Plan"s 100-Year
Plan
Ask Slashdot: Best
Data Provider When
Traveling In the
US?
Article viewer

How to stop a Form from Closing in Delphi



Written by:xeno2
Published by:Nightscript
Published on:2004-06-17 13:31:36
Topic:Delphi
Search OSI about Delphi.More articles by xeno2.
 viewed 17201 times send this article printer friendly

Digg this!
    Rate this article :
Rewriting this article to use with Delphi.

This example use one simple command - ABORT;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  if MessageDlg('Do you really want to close this application?',mtWarning,[mbYes,mbNo],0)=mrNo then
    abort;
end;


Very simple ;o) - but working very well ;o)

Did you like this article? There are hundreds more.

Comments:
Anonymous
2009-07-27 09:50:26
This code is Wrong.. Not working..
Code must be..
if MessageDlg('Do you really want to close this application?',mtWarning,[mbYes,mbNo],0)=mrNo then
action := caNone;

Thanks. Fatih Murat ARSAL
Anonymous
2010-02-20 00:19:27
this code is Work very well Anonymous! No Problem with any delphi compiler.

so my official compiler is doing this with abort syntax.

javad rahmatzadeh
Anonymously add a comment: (or register here)
(registration is really fast and we send you no spam)
BB Code is enabled.
Captcha Number:



     
Your Ad Here
 
Copyright Open Source Institute, 2006