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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:19:48+00:00 2026-06-09T16:19:48+00:00

I am attaching log in module in my form. I am getting problem in

  • 0

I am attaching log in module in my form. I am getting problem in this because login form has to show before the other mainform so user can be authenticated. I am using VS 2005, i have two forms now

1) Login 2) MainForm
I just want to show login form before mainform and close(not hide) login form after authentication. Is there any way? Previously i worked splash screen and solved it with threads.

  • 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-09T16:19:50+00:00Added an answer on June 9, 2026 at 4:19 pm

    Is this a Windows Forms application? Could you not open a new instance of the LoginForm when the MainForm is instantiated from the main method?

    You could then use the DialogResult to determine whether the user is authenticated and call Dispose() on the LoginForm afterwards.

       public partial class MainForm : Form
        {
            public Form1()
            {
                InitializeComponent();
                DialogResult dr = new DialogResult ();
                LoginForm loginForm = new LoginForm ();
                dr = loginForm.ShowDialog();
                if ( dr == DialogResult.OK )
                {
                   //user is authenticated
                }
                else 
                {
                   //user isn't
                }
            }
        }
    

    And your login form could look like this

        public LoginForm()
        {
            InitializeComponent();
            if (DoAuthentication)
            {
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                this.DialogResult = DialogResult.None;
            }
            this.Close();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attaching a method to the post_save signal of my Django model. This
After attaching newly backuped database, I'm getting an exception: Caused by: org.hibernate.PropertyAccessException: exception setting
If I'm attaching a unique ID to #Atest1 , #Atest2 , does this make
Hi I wanted to upload images(along with other form details) and preview them, using
I am attaching an image. Some of you might have tried this iphone application
i am attaching the code. In this code i am taking a string which
When attaching several Android devices to my development machine, it quickly becomes difficult to
Currently we are attaching a file to a Lotus Document with the following code:
I'm attaching a new database programatically using VB.net application. I wrote DB scripts and
I am attaching an asp.net textbox image I want my textbox should have two

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.