Once you close the child forms, they should drop out of the MdiChildren
collection.
So you can just use this:
if (!MdiChildren.Any())
{
// all child forms closed
}
If you've just hidden the child forms, not closed them, you can use:
if (MdiChildren.All(c => !c.Visible))
{
// all child forms hidden/closed
}