private void ArrangeWindows ()
{
if (!IsHandleCreated)
return;
int change = 0;
if (prev_bottom != -1)
change = Bottom - prev_bottom;
foreach (Control c in Controls) {
Form child = c as Form;
if (c == null || !child.Visible)
continue;
MdiWindowManager wm = child.WindowManager as MdiWindowManager;
if (wm.GetWindowState () == FormWindowState.Maximized)
child.Bounds = wm.MaximizedBounds;
if (wm.GetWindowState () == FormWindowState.Minimized) {
child.Top += change;
}
}
prev_bottom = Bottom;
}