The SetFocus method conflicts with these events, which are testing to see if the object can get or lose focus.
Call SetFocus from the GotFocus event instead.
Call SetFocus from the LostFocus event instead.