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 8669549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:30:04+00:00 2026-06-12T18:30:04+00:00

The requirement in my work is to first show a splash screen which takes

  • 0

The requirement in my work is to first show a splash screen which takes in a some data from user, authenticates him and starts another form.
So, I am starting the splash screen with Application.Run and once, it has done its done, call Application.Exit and then call Application.Run again for the new form. But, this doesn’t start the new form.
I have a create a new thread and assign its ApartmentModel as STA to start the new form.

I would like to understand why is Application.Run not working after calling Application.Exit?

Sample Code:

        Application.Run(SplashForm);  

        if (_authorizationSuccessful)
            Application.Run(new Form2())
        else
        {
            //just close
        }
  • 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-12T18:30:05+00:00Added an answer on June 12, 2026 at 6:30 pm

    It is fairly convoluted, but the core issue that it isn’t actually a Form that keeps an Application alive. The core helper class is ApplicationContext, also exposed as one of the overloads of Application.Run(). When you use the other overloads, Run() and Run(Form), the Application class creates a hidden instance of ApplicationContext. Which is global, like all of the Application properties and methods.

    So when you call Application.Exit(), you mark that global instance of ApplicationContext as “no longer active”. Which makes the next call to Run(Form) immediately exit.

    You can monkey with your own ApplicationContext instances instead to solve this issue. But the boilerplate solution is to use the ShowDialog() method on the login form. Also a good way to return the “login is good, let’s continue” state, the DialogResult is useful.

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

Sidebar

Related Questions

I have requirement for an application which work in background only. When first time
My requirement is to work on some interface .h files. Right now I have
Requirement is like: I want to take input values from user in frame but
At first I thought that hash hack is a requirement, however judging from the
Where I work it is a requirement for us to go through stored procedures
Some requirements for a mobile chat room: Should be able to work seamlessly with
Requirement : In an app, During the first launch it is required to download
Requirement : Should update MySQL database with that of MS Sql Server updates which
First off, I know I can copy "this" on instantiation, but that doesn't work
First Some Background I'm planning out the architecture for a new PHP web application

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.