My application has the following user interface configuration:
The main form is an MDI container. Its child forms are attached to TabStrip.
Each user has his own set of child forms. Depending on the active user, only the child forms of the user are displayed along with the tabs.
This is achieved by going through the main form MdiChildrenand setting their properties Visiblein false/true, depending on the active user.
foreach (Form item in MdiChildren)
{
if (((OfficeFormEx)item).UserID == (int)e.NewTab.Tag)
{
item.Visible = true;
}
else
{
item.Visible = false;
}
}
This has two undesirable effects. First, each child form is redrawn sequentially, which is ugly and slow. Another thing is that for some reason the forms go from maximized to normal, effectively undocking them from the main form.
, , , ? / , .