Basic form closing question..
EDIT: I figured it out!
I have two forms: Frontpage, and Main
When my program starts, Frontpage is loaded, and it has a button to continue (It contains some instructions)
It then opens Main, and that works, but I cannot get Frontpage to close without terminating my whole program...
How can I close Frontpage without ending my program? I don't want to just hide it, because if I do that then once I close Main it keeps the program running...
Thanks,
Ryan
Re: Basic form closing question..
Bah! I managed to get it! Haha
Re: Basic form closing question..
It's considered good form to provide your solution if you figure it out for yourself, such that it might help others with the same issue. To that end, there is an option on the Application page of the project properties that controls when the application closes. That must specify when the last form closes, rather than when the startup form closes. You must then ensure that you open the next form before closing the current.
That said, there's probably a better way when the first form isn't your main form. Select the second form as the startup form and then display the other form as a modal dialogue from the Startup event handler of the application. That way, the application will still exit when the startup form closes, which is usually what you want. The other option is generally for dialogue-based apps, which are essentially wizards.