当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - Is it a good practice to have just a single form?

问题描述:

I'm essentially a web developer, but I want to know if it is a good practice to have one main form in desktop applications (winforms), I mean for log in form, main form, help form,... just by rendering/removing controls inside a single form? or it is better to have a new form for each one?

网友答案:

I would advise against it. It would be a nightmare to maintain all of that state.

网友答案:

It's generally better to have a form for each one, mainly for ease of maintenance but it can also help with the overall design of the application. E.g., if the Login is a dedicated form, you can reuse that Login dialog anywhere in the application if you wanted to, say if the user timed out after signing in.

网友答案:

I prefer to use seperate forms individually for each and it is completely based on how you design your application

分享给朋友:
您可能感兴趣的文章:
随机阅读: