private void OnControlSizeChanged(object sender, EventArgs e)
{
if (!Control.Size.IsEmpty)
{
Form ownerForm = Control.FindForm();
// When the control is inside a minimized form we do not enforce the minimum
if ((ownerForm != null) && (ownerForm.WindowState != FormWindowState.Minimized))
EnforceInnerMinimum();
}
}