It's simple stuff. Handle the Validating event and set e.Cancel to True if validation fails to prevent the control losing focus. Before using the data, call ValidateChildren to ensure that even controls that haven't received focus are validated. Provide a Cancel Button and set its CausesValidation property to False so that clicking it will not cause the previous control to be validated. That allows you to close the form while it contains invalid data.