26818 total geeks with 3504 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
MaxMouse
It's Friday... That's good enough for me!
CodeX
non stop lolz here but thats soon to end thanks to uni, surely the rest of the world is going good?
stabat
how things are going guys? Here... boring...
CodeX
I must be going wrong on the password lengths then, as long as it was done on ECB
MaxMouse
lol... the key is in hex (MD5: of the string "doit" without the "'s) and is in lower case. Maybe i should have submitted this as a challenge!

Donate
Donate and help us fund new challenges
Donate!
Due Date: Apr 30
April Goal: $40.00
Gross: $0.00
Net Balance: $0.00
Left to go: $40.00
Contributors


News Feeds
The Register
R.I.P. LADEE: Probe
smashes into lunar
surface at 3,600mph
Judge halts spread
of zombie Nortel
patents to Texas in
Google trial
Record labels sue
Pandora over
vintage song
royalties
True optical zoom
coming to HTC
smartphone cameras
Google lets wannabe
Glass Explorers
ADMIRE THEMSELVES
in their own
mirrors
Liftoff! SpaceX
Falcon 9 lifts
Dragon on third
resupply mission to
ISS
Leaked photos may
indicate slimmer
next-generation
iPad
Reddit users
discover iOS
malware threat
Edward Snowden on
his Putin TV
appearance: "Why
all the criticism?"
Number crunching
suggests
Yahoo! US is
worth less than
nothing
Slashdot
DARPA Developing
the Ultimate
Auto-Pilot Software
SpaceX Lands
Launches Load to
ISS, Successfully
Tests Falcon 9 Over
Water
Bookies Predict the
Future of Tech
Minerva CEO Details
His High-Tech Plan
To Disrupt
Universities
Peoria Mayor Sends
Police To Track
Down Twitter
Parodist
California Utility
May Replace IT
Workers with H-1B
Workers
How Nest and FitBit
Might Spy On You
For Cash
Americans
Uncomfortable With
Possibility of
Ubiquitous Drones,
Designer Babies
MediaGoblin and FSF
Successfully Raise
Funds For
Federation, Privacy
Features
VA Supreme Court:
Michael Mann
Needn"t Turn Over
All His Email
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 14218 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