procedure TCustomForm.VisibleChanging; begin if (FormStyle = fsMDIChild) and Visible then raise EInvalidOperation.Create(SMDIChildNotVisible); end;