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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:07:41+00:00 2026-05-13T10:07:41+00:00

I created a login form in c#. If a user signs in with the

  • 0

I created a login form in c#.

If a user signs in with the right password and username and clicks on ‘Login’ then the second form opens. How do I close the login form after the last step?

  • 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-13T10:07:41+00:00Added an answer on May 13, 2026 at 10:07 am

    Change your Main() method in Program.cs to display the login dialog. Don’t start the message loop unless a valid login was entered. For example:

    static void Main() {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      using (var login = new LoginForm()) {
        if (login.ShowDialog() != DialogResult.OK) return;
      }
      Application.Run(new Form1());
    }
    

    Your LoginForm should set its DialogResult property to OK if it detected a proper login.

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

Sidebar

Related Questions

I have a very generic login form created that allows a user to access
I am developing a login form with User Name and Password. I want the
I created Aspx login page and ext js login form in it ExtJs code
I have created Login forms and registration forms for a website. The form is
I created a login page using spring_security_check. Here: <form name='f' action=/sec_test/j_spring_security_check method='POST'> <table> <tr>
I recently created a Sinatra app with a login form (no basic auth). To
I have creating a login form where I have created sqlite database,in this I
After a user signs up, the following IntegrityError is displayed: IntegrityError at /users/signup (1062,
I have created a login form. It works fine, but it goes back to
I have a login form where the user can login only with the valid

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.