deactivate();
The deactivate event of the Form class occurs when a different form becomes the active window.
When a non-MDI form or another MDI frame is then made active, both the active child and the MDI frame receive deactivate events (in that order). When moving between child forms of an MDI frame, only the child forms receive a deactivate event.
The deactivate event occurs when moving the focus within an application (including MDI to non-MDI) and to another application. The deactivate event does not occur when unloading a form.