Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 30th, 2003, 03:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default Application.Exit() Help

I am having major dramas exiting from my application.
I have a situation where I wish to exit from my app under a certain condition, however the line
Application.Exit();
does not seem to work.
It works fine in a simple Hello World type app but not in mine.
Is there anything a novice to c# should know about this.

It is not in a loop and not in a catch or finally block.
It is however a couple of functions deep from the initialise components function.

Thanks in advance.


======================================
They say, best men are moulded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
 
Old October 3rd, 2003, 08:23 AM
Authorized User
 
Join Date: Jun 2003
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you have validation code in either of these events that must be executed, you should call the Form.Close method for each open form individually before calling the Exit method.

Hope this help....
 
Old October 8th, 2003, 07:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Thanks Tomaz,

I'll try that, I got around it earlier but my solution is not ideal.

Thanks again.

======================================
They say, best men are moulded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================





Similar Threads
Thread Thread Starter Forum Replies Last Post
Force users to exit access application giswim Access 10 January 31st, 2014 04:27 AM
Access application exit button generate lock ayazhoda Access VBA 1 June 17th, 2008 10:28 AM
Application.exit() fails to terminate application. saumya General .NET 1 January 4th, 2008 09:50 AM
exit from for-each preethi.s XSLT 1 September 8th, 2006 05:37 AM
Exit Application King_ General .NET 0 February 23rd, 2006 10:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.