I have two forms in my program. The first is the login form and the other is the home form.
When i click the ‘Enter’ button on the login form, it should close or dispose the login form and then open the new home form. I have not been able to do this. Please help me out.
I have two forms in my program. The first is the login form and
Share
You can’t. The owner of the new form is the ‘login form’. Once that closes, so will any other child forms.
I would create the form you are working on first, say the ‘home form’, hide it, then open the ‘login form’ using the ‘home form’ as its parent.
Simply doing this in the constructor of the ‘home form’ would work. Once the login is complete, close it and show the ‘home form’.
eg: