Hi Steve,
I am not sure how to check if the close button has focus, normally you can used Focused() for this. The first example will work for the close button on the form, because the close button is not in the client area of the form.
This gives you roughly the same functionality <s> i.e. the control is validating because of an action outside the client area of the form.
- Craig
"If you're not prepared to be wrong, you will never come up with anything original."
- Sir Ken Robinson