The Activate method activates a window, making it the frontmost.
window.Activate
• window – A window object.
If the window is minimized, the Activate method expands the window.
The BeforeActivate and AfterActivate events occur when you activate a window.