开发者

Menu and Main app forms, correct way?

I have a main Form app. OnLoad it displays with Docstyle=Fill the main menu which is done by user control. If the user selects a choice in that Menu control, it fires an event (with one parameter Choice) which main forms reacts on. If the choice is run the app, it closes the user control (dipose) and call method starting the app. If the choice is to q开发者_如何学Gouit, it calls Application.Exit. Is that alright form programmers point of view?


If you don't have to save any data and you just like to quit the application, it's the best way to do like you described. If you're using other windows you could use the collection Application.OpenForms and close all open windows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜