0

I have a login form and the other form which contain the operation to be perform
In login form Submit Button, i am validating the emp code from database
If it is proper then i am writing

frm.Show();
this.Hide();

frm is the second form to be shown
My application is running fine
After successful operation i am asking the user to close the application if yes it closes
But it still running in the background as i see in task manager
I am not getting what is going on

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by zachattack05
0

If you want to exit from project then use

Application.exit();

rather than

this.close();

Or

While closing Check the open login form like this way

foreach (Form ab in Application.OpenForms)
             {
                 if (ab is LoginForm)
                 {
                     ab.exit();
                 }
             }

Cheers....

0

Another option is to open the main application form when the application starts (the frm form) and immediately hide it, and then show the login form. That's what I usually do.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.