Canvas.Deactivate
From Xojo Documentation
Event
The Canvas is deactivated. See the Application and Window Deactivate events.
Notes
In a multiple window interface, the Deactivate event fires when the parent window is deactivated because another window has been brought to the front or a window belonging to another app becomes frontmost. In a single window app, the Deactivate event fires when a window belonging to another app becomes frontmost.