I have winforms app with a login form in which the user enters a user Id and a password. After the correct user id and password is entered, the main form is displayed. When the main form is closed the Login form is still there. I need to get rid of the login form. I haven't been able to figure out how to do this. How do I get to the the Main Form's closing or unloading event? And when I am able to get to this event what do I type to close the login form?
I was so messed up that I didn't have any code to show. What I ended up doing was hiding the login form. But that alone wasn't good enouh becuase when I closed the main form Visual Studio had the Blue square (stop debugging) icon lit up. The program was still running. So I added a Form_Closing event by using the lighting bolt and added Application.Exit. So that took care of the running program. It all works now. Thanks.
Bookmarks