Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9011421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:43:32+00:00 2026-06-16T02:43:32+00:00

Possible Duplicate: Application.Exit I have a Winforms app in which Application.Exit() fails to run.

  • 0

Possible Duplicate:
Application.Exit

I have a Winforms app in which Application.Exit() fails to run.

public Form1()
{       
   InitializeComponent();           
   path=parseINI();//Gets path from ini file           
} 

In my case, Application.Exit() is being called from the parseINI method, where it doesn’t work. Is the problem that its being called when the app is starting? I stuck it in another method that runs after the form is loaded, and it works there. I did use Environment.Exit in my parseINI method, and that worked (despite it being for console apps rather than WinForms).

EDIT: I should probably add that its there as a check, to make sure a file being read is formatted correctly, if it is, then its not called, otherwise the program exits.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:43:33+00:00Added an answer on June 16, 2026 at 2:43 am

    This might be because you still haven’t started the application via Application.Run when the Form ctor executes.

    The common startup code template goes like this:

    Application.Run(new Form1());
    

    If that is the case, you call Application.Exit before Application.Run. So after you have called exit, you effectively call Run, and therefore, the application runs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: how to quit (exit) an app in iPhone4 sdk I have a
Possible Duplicate: Facebook App-Application is misconfigured for Facebook integration I have registered my app
Possible Duplicate: Convert ipad application to iphone. Universal app I created one application which
Possible Duplicate: Proper way to exit iPhone application? How can I Crash my app?
Possible Duplicate: Windows Phone 7 close application How to Exit from the app when
Possible Duplicate: automatically run an application on Android phone startup I have developed an
Possible Duplicate: When you exit a C application, is the malloc-ed memory automatically freed?
Possible Duplicate: Porting VB.NET Winforms Application to C# Is there any way to convert
Possible Duplicate: Xcode: Storyboard Tabbed Application Passing Data Back and Forth Basically I have
Possible Duplicate: How to switch an Application between Themed and not Themed at run-time?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.