The WindowEx.SetActiveWindow function activates a window.
number WindowEx.SetActiveWindow(
number hWnd --handle of window to activate
);
Parameters
hWnd
Identifies the top-level window to be activated.
Return Values
If the function succeeds, the return value is the handle of the window that was previously active.
Remarks
The WindowEx.SetActiveWindow function activates a window, but not if the application is in the background. The window will be brought into the foreground (top of Z order) if the application is in the foreground when it sets the activation.