Added logic to disallow interaction with a form's border close button