This method moves an application to the foreground.
HRESULT MoveAppToForeground( LONG ProcID, LONG *pZOrder, LONG Flags );
NOERROR indicates success. E_INVALIDARG indicates that an invalid argument was entered. If an error occurs, the appropriate HRESULT value is returned.
The Forms Manager maintains a z-order for active, registered processes. If you want your application to present information to a user in a pop-up control, call this method with the ASFC_APPSTYLEFLG_POPUP flag. The application receives the current z-order of the application, and then moves to the foreground without sending a WM_APPACTIVATE message to the application that was in the foreground before the call to this method. Although this method changes the foreground application, this method does not change the application context in which the user works. When finished with the pop-up control, your application should call IfmManage::RestoreAppZOrder with the z-order that the application received from the original call to IfmManage::MoveAppToForeground.
IfmManage::RestoreAppZOrder, IfmManage::MoveToForeground