Ok, I have a great CRUD application that uses tabs with forms embedded in them โ
public static void ShowFormInContainerControl(Control ctl, Form frm) { frm.TopLevel = false; frm.FormBorderStyle = FormBorderStyle.None; frm.Dock = DockStyle.Fill; frm.Visible = true; ctl.Controls.Add(frm); }
Then I call below in the Form Load event of the parent form ->
// Embedd the child form in the this Parent WinFormCustomHandling.ShowFormInContainerControl(pnlModuleHost, _frmWWCModuleHost);
This was given to me HERE in response to my previous question.
As I progressed in this, I continue to feel uncomfortable that multi-layer inline forms are a disaster awaiting their appearance and user controls continue to appear. Can someone offer me specific advice on using custom controls and implementing forms?
See my previous question for inspiration for this. HERE
, .
UserControl, , , ( ), Form , , .
:
public static void DockControl(this Control control, UserControl userControl) { userControl.Dock = DockStyle.Fill; control.Controls.Clear(); control.Controls.Add(userControl); }
, , , , . , . , , , , ? , , .
, , , , . , , , - " ?". , , : " ?".
, , , , ... Microsoft Patterns and Practices (CAB)