You cannot run any Windows API calls directly from Formativ/VBScript. You have to create your own component/wrapper that will serve as a proxy between your script and the APIs. However, Formativ has exposed some common Windows APIs (i.e. FindWindow, SetForegroundWindow). See the Formativ Language Guide for more details.
In the meantime, you can find the handle of the message window then set as foreground window. You can also set the focus to a specified control of the message window. Here is an example:
iHandle = Utilities.FindWindow("OFMailView","") if (iHandle > 0) then utilities.SetForegroundWindow(iHandle) utilities.doevents ' Gives the input focus to a specified Windows control. call groupwise.FocusSet(fcsMessage, "") end if
Hope this helps.