I’m doing a small project to store movies. I’m using three windows form, a intro form, a main form and a new movie form. I also have a class that I call MovieManager that is the heart of the application. My problem is that I’m not sure how I should handle this windows.
Let’s say I want the application to start with the intro form and when the user click on the OK-button the main form should appear. What is the best way to do this? Should I in the Program.cs create an object of the MovieManager class that show and hide the different windows form or should I in the Program.cs just start by showing the intro form?
You can simply do all staff in Program.cs when starting application. Show your IntroForm as dialog. If user clicks OK, then start main application form, otherwise close application.
If you need single
MovieManagerinstance for all these forms, then you can create it in Main method and pass same instance toIntroFormandMainForm:Also you can implement
MovieManageras Singleton, which will be accessible everywhere via static propertyMovieManager.Instance.