I have a very simple application and would need to have a menu screen in the beginning.
However I do not know what is the best way:
- Use different Form? But then both can be independently sized which I do not want
- Use (modal?) Custom Control in the Main form that disappears once the “Run” is selected.
- In the
Application.Runexecute the Menu, finish and then execute the app itself? Not sure if there will be any problems with that. - Any Other options?
Thanks in advance for your advice.
First of all; set up a view controller. One central class that you can ask what view to display. This will save you a few issues down the line.
Second there are several ways to approach this. Personally I don’t like having many free-floating forms (even though they are displayed one at the time). If you use forms then consider setting them as MDI children for the main form. The ViewController can take care of maintenance like setting as MDI child, show, maximize, go to top, remove minimize button, etc.
Alternatively you can use user controls that you initialize and put on the screen.
From what I read your main concern is how to control when a screen is displayed, for whatever reason. If you hook up events such as Form_Close to the ViewController you can put the logic there.