I’m looking for a Window event like Delphi’s OnShow. When is Window.Activate triggered? Everytime the Window is shown or on the foreground?

Every time the window gets focus. That includes when you call MsgBox - when the user dismisses the msgbox, the window becomes “active” again and the event fires. If you need an event that only fires once, set a flag in Activate so your code only runs the first time.

Ok thanks Tim.