I have a WinForm which has many panels, and each panel has many controls, which make it very hard to handle the design of this form, how to move each panel to a new form and return all panels to the main form at runtime?
Asked
Active
Viewed 188 times
0
-
What code have you tried so far? What is the main reason for wanting to move controls between forms? – Ben Jan 30 '17 at 08:49
-
2You can make each panel a user control and add them to your form. – HebeleHododo Jan 30 '17 at 08:52
-
the main form has much many panels and controls, and it's so hard to work with them Ben – T.Hajjar Jan 30 '17 at 09:13
1 Answers
3
Creating a UserControl
will help modularize your user interface. You should create one user control per panel let's say and then use those user controls in your form.
The nice thing about
UserControl
is that they are reusable and can be designed (visually) just like the Forms are designed.
You can refer to this below link to know more about UserControls
for WindowsForms
:
https://msdn.microsoft.com/en-us/library/aa302342.aspx

Chandan Kumar
- 4,570
- 4
- 42
- 62

Ghareeb Falazi
- 61
- 5