PC Review


Reply
 
 
PCH
Guest
Posts: n/a
 
      29th Aug 2004
I have a class that is loaded from the main form. And if certain req's are
met, it needs to close the entire program. I am using the Application.Exit
command, but it seems to ignore it! it keeps executing other code after its
been called.

Is there any way to force the program to close down?


 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      29th Aug 2004
You can't guarantee that no other code wil be executed after a call to
App.Exit. The best way to stop the app is to close its main form - App.Exit
is sort of an emergency approach. You may want to set some global flag, to
indicate that the app is terminating, and based on it not to continue
certain operations.

--
Alex Feinman
---
Visit http://www.opennetcf.org
"PCH" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a class that is loaded from the main form. And if certain req's are
> met, it needs to close the entire program. I am using the
> Application.Exit
> command, but it seems to ignore it! it keeps executing other code after
> its
> been called.
>
> Is there any way to force the program to close down?
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exit Field vs Exit Button...... =?Utf-8?B?cm95X3dhcmU=?= Microsoft Excel Programming 2 10th Oct 2007 04:05 PM
Application.Exit() vs Environmrnt.Exit(0) =?Utf-8?B?VGFvZ2U=?= Microsoft C# .NET 1 19th Apr 2007 03:37 AM
Code to Exit Web App and Exit Internet Explorer =?Utf-8?B?U2FuZHk=?= Microsoft ASP .NET 6 4th Aug 2005 09:28 PM
Outlook.exe posts an error on exit that it needs to exit. How do. =?Utf-8?B?SmFjayBIYWVzbHk=?= Microsoft Outlook Installation 0 4th Mar 2005 04:17 AM
The exit X is greyed out. I cannot exit Excel...in 2000 and now i. =?Utf-8?B?S2l0dHlv?= Microsoft Excel Misc 1 28th Sep 2004 06:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:01 PM.