IfmManage::MoveAppToForeground

This method moves an application to the foreground.

Syntax

HRESULT MoveAppToForeground( LONG ProcID, LONG *pZOrder, LONG Flags );

Parameters

ProcID
The process identifier of the application.
pZOrder
Pointer to the current z-order of the process. It can be NULL.
Flags
Currently, there is only one flag, ASFC_APPSTYLEFLG_POPUP.

Return Values

NOERROR indicates success. E_INVALIDARG indicates that an invalid argument was entered. If an error occurs, the appropriate HRESULT value is returned.

Remarks

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.

See Also

IfmManage::RestoreAppZOrder, IfmManage::MoveToForeground