26988 total geeks with 3514 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
nalvanzjuli
[b][url=http ://www.rawf. org/]canada goose<strong ><a href="http:/ /www.rawf.or g/">canada goose parka outlet</a></ strong> <br> <strong><a href="http:/ /www.rawf.or g/">canada goose sale</a></st rong> <br>
nalvanzjuli
[b][url=http ://www.pando rasilverstor e.com/]pando ra jewelry wholesale[/u rl][/b] [b][url=http ://www.pando rasilverstor e.com/]pando ra jewelry cheap[/url][ /b] and on line are happen to be keen to do business with you.The internet today is no exception, and i
nalvanzjuli
<strong><a href="http:/ /www.timberl andoutletsto res.com/">ti mberland boots</a></s trong> <br> <strong><a href="http:/ /www.timberl andoutletsto res.com/">ti mberland outlet</a></ strong> <br> <strong><a href="http:/ /www.timberl andoutletsto res.com/">ti mberland sh
nalvanzjuli
<strong><a href="http:/ /www.cheapbe atsbydretop. com/">beats headphones for sale</a></st rong> <br> <strong><a href="http:/ /www.cheapbe atsbydretop. com/">dr dre beats on sale</a></st rong> <br> <strong><a href="http:/ /www.cheapbe atsbydretop. com/">Beats By Mons
nalvanzjuli
[b][url=http ://www.copyp atekwatchsal e.com/replic a-patek-ladi es-watches-c -6.html<stro ng><a href="http:/ /www.copypat ekwatchsale. com/replica- patek-ladies -watches-c-6 .html">patek philippe watches</a>< /strong> <br > <strong><a href="http:/ /www.copypat ekwatchsal

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
RealVNC distances
itself from
factories, power
plants, PCs hooked
up to password-less
New twist as rogue
antivirus enters
death throes
Apple"s iWatch?
They cannae do it
... they don"t have
the POWER
Amazon flicks
switch on
CloudFront security
features
Microsoft, Google
link arms on
browser vid chat
VMware buys
CloudVolumes to
speed app
installations
Slapdash SSL code
puts tons of top
Android Play Store
apps in hack peril
Microsoft exits
climate denier
lobby group
Storage, chip
slingers pledge
allegiance to
Linux, open source
Pull up! Pull up!
Pull up! Ding ...
HP ends
eleven-quarter
sales nosedive
Slashdot
National Science
Foundation Awards
$20 Million For
Cloud Computing
Experiments
China Pulls Plug On
Genetically
Modified Rice and
Corn
How Argonne
National Lab Will
Make Electric Cars
Cheaper
Study: Seals
Infected Early
Americans With
Tuberculosis
Smartphone Kill
Switch, Consumer
Boon Or Way For
Government To Brick
Your Phone?
Scientists Baffled
By Unknown Source
of Ozone-Depleting
Chemical
At Home with Tim
O"Reilly (Videos 3
and 4 of 6)
Do Readers Absorb
Less On Kindles
Than On Paper? Not
Necessarily
Tor Browser
Security Under
Scrutiny
Linus Torvalds: "I
Still Want the
Desktop"
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 14801 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