Question:
How can I maximize Viewer and set it as the top-level window when an alarm fires?
Solution:
You can do this by creating a user event in the Viewer that monitors when the alarm you choose will fire. In this event’s script, you can write:
Item(“_top”).MaximizeFrame()
Item(“_top”).SetForegroundWnd()
However, even with this solution, sometimes the Viewer window will not be set as the top level window, but its item in the Windows taskbar will start to blink (just like a MSN Messenger call).
Blinking items on the taskbar is a characteristic Windows behavior to avoid frequent focus loss. To change this, it is necessary to reconfigure Windows, and this can be done by Tweak UI, which can be downloaded in Microsoft PowerToys for Windows XP.
In Tweak UI, select General – Focus, then uncheck Prevent applications from stealing focus option.
After this, the Viewer window will be set as the top level window normally; but, if the focus is on the Windows taskbar (because of a Ctrl+Esc command, for example), even it is configured to allow windows to steal focus, Windows will blink items in the taskbar.