27087 total geeks with 3528 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
sdchristebrad
<strong><a href="http:/ /www.columbi a-sportswear -outlet.com/ ">columbia jackets outlet</a></ strong> <str ong><a href="http:/ /www.columbi a-sportswear -outlet.com/ ">columbia sportwear outlet</a></ strong> <br> <strong><a href="http:/ /www.columbi a-sportswear -outle
sdchristebrad
[b][url=http ://www.asics onsale.com/a sics-womens- running-shoe s-c-11.html] asics w<strong><a href="http:/ /www.asicson sale.com/asi cs-womens-ru nning-shoes- c-11.html">a sics women's running shoes outlet</a></ strong> <br> <strong><a href="http:/ /www.asicson sale.c
sdchristebrad
<strong><a href="http:/ /www.asicson sale.com/">a sics running shoes</a></s trong> <br> <strong><a href="http:/ /www.asicson sale.com/">a sics running shoes</a></s trong> <br> <strong><a href="http:/ /www.asicson sale.com/">a sics gel kayano 20</a></stro ng> <br> <br
sdchristebrad
[b][url=http ://jpguccise llwellforu.c om/]gucci outlet[/url] [/b] [b][url =http://jpgu ccisellwellf oru.com/]dis count gucci handbags[/ur l][/b] [b][url=http ://jpguccise llwellforu.c om/]gucci on sale[/url][/ b] http://www.c heapjerseysp opular.com/ cheap nfl
sdchristebrad
[b][url=http ://www.santo rinihostels. com/nbspnbsp nbspnbspmens -apex-bionic -jackets-c-3 .html]north face men's apex bionic jacket[/url] [/b] [b][url=http ://www.santo rinihostels. com/nbspnbsp nbspnbspmens -apex-bionic -jackets-c-3 .html]new north face men's apex bi

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


News Feeds
The Register
Google absorbs
Oxford Uni boffins
in artificial
intelligence boost
quest
Something about
this really STINKS:
Rosetta probe
shoves nose under
comet"s tail
Rackspace launches
big red rack eater
Adorkable overshare
of words like
photobomb in this
year"s dictionaries
MAVEN snaps
eight-bit SPACE
INVADER
"Careful management
of headcount" for
Juniper after tepid
quarter
Boffins want to put
Quanta in
containers, after
docking
Yahoo!
Timestamps!
Now!
Block!
Facebook!
Email!
What does beating a
dead horse look
like? Look no
further than the
US TV giants vs
Samsung gets
virtual with tiny
S5 upgrade and
goggle grab
Slashdot
NY Doctor Recently
Back From West
Africa Tests
Positive For Ebola
Tracking a Bitcoin
Thief
How Sony, Intel,
and Unix Made
Apple"s Mac a PC
Competitor
SMART Begins Live
Public Robocar
Tests In Singapore
Microsoft Exec
Opens Up About
Research Lab
Closure, Layoffs
Tech Firm Fined For
Paying Imported
Workers $1.21 Per
Hour
Mark Zuckerberg
Speaks Mandarin At
Tsinghua University
In Beijing
Assange: Google Is
Not What It Seems
Leaked Documents
Reveal
Behind-the-Scenes
Ebola Vaccine
Issues
Ubuntu 14.10
Released With
Ambitious Name, But
Small Changes
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 15127 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