I have two forms named frmRegistration & frmMain in my project in c#.
I have set frmRegistration as my start form.
User enters data in the frmRegistration form & presses submit button to get registered. Then, I want to close frmRegistration form & show frmMain form to the user.
I’m trying this by using Dispose() method of the frmRegistration. But, when I use this method, it disposes all my application execution because frmRegistration is the startup form.
I don’t want this to happen. Can anyone solve this problem?
thanks.
Use
Show()andHide()methods.UPDATE:
If you don’t want to have frmRegistration in memory, start your program in main form and add this in your MainForm’s
Shownevent:Now you can just close the registration form and automatically get back to main form.