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

  • SEARCH
  • Home
  • 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 3421644
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:07:34+00:00 2026-05-18T06:07:34+00:00

I have 2 forms: signin and control_panel . After signin done I’m hiding this

  • 0

I have 2 forms: signin and control_panel. After signin done I’m hiding this form by this.Hide() function and same time I am making new object of control_panel form and showing it by newobj.Show();. But when I am closing directly control_panel form, I am seeing first form thread are still running. I am closing it by stop_debugging button. How will I close every threads or whole program exit simultaneously.

  • 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-05-18T06:07:34+00:00Added an answer on May 18, 2026 at 6:07 am

    The thread for your first form is still running because you’re only calling this.Hide. All that does is hide the form; it doesn’t close it. Instead, you need to use this.Close, which will close your original form.

    If you want to make sure that your entire application exits, and in the process close any forms that may still be open, you can use the Application.Exit method anywhere in your form’s code.

    EDIT: To expand on my last comment, you might want something like this in your Program.cs file:

    static class Program
    {
       /// <summary>
       /// The main entry point for the application.
       /// </summary>
       [STAThread]
       static void Main()
       {
          Application.EnableVisualStyles();
          Application.SetCompatibleTextRenderingDefault(false);
    
          SignInForm frmSignIn = new SignInForm();
          if (frmSignIn.ShowDialog() == DialogResult.Yes)
          {
             //If the sign-in completed successfully, show the main form
             //(otherwise, the application will quit because the sign-in failed)
             Application.Run(new ControlPanelForm());
          }        
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my web.config I have this authentication setting: <authentication mode=Forms> <forms loginUrl=login.aspx name=signin path=/
I have 2 basic forms: sign in and sign up, both on the same
I have a login form as below, I have tried doing this by onkeydown
I am new in .net.I need help. I have 2 forms one form has
I have a form that slides down on click signin and slides up on
I'm coding in c# using visual studio 2010. I have 2 forms. One form
I have a form which submits user first and last name using POST signin.html
I have MVC application configured to use Forms Authentication. I'm signing out users by
I have a sign in form and a lost password form. Currently in my
I have forms which work fine. I have a quiz which works fine. When

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.