Click here to Skip to main content
16,017,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI guys,

I'm having a form with 3 different buttons. This buttons must open different forms on click.

What will be the best way, whether to use 3 forms for each buttons or we can have a common form and use the user-control to fit in on each click?

Thanks,
Skunkhead :)
Posted

I think its depend on your requirement like if you would be display same thing for each forms then User Control is best else Different Forms.
 
Share this answer
 
It depends on what the forms are doing: if they are all doing similar things (say, looking a details of different people) then the same form makes sense.
If they are doing different things (say, one looks at peoples employment history, another edits current address and contact details) then different forms.
Generally, if you have to ask the question, you need different forms: keep them separate if the data is separate. Think about it: If one form has only 1 TextBox and two buttons, do you want it sharing the same screen real estate as a form containing ten TextBoxes, two drop down lists, and a DataGridView?
 
Share this answer
 
Many forms are certainly bad.

Use all in one form if you can. Is it UserControl or not — does not matter; you can do different designs with different techniques. Now, we're talking designs. You can use, let's say, 3 overlapping panels; on button click show one (discriminated by which button is pressed) and hide two. Also, use: tab interfaces, expanding panels, dockable interfaces, master/detail controlled by list or tree selection, etc. Most important: don't use MDI.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900