Important: The information in this document is obsolete and should not be used for new development.
SetFrontProcess
Use theSetFrontProcess
function to set the front process.
FUNCTION SetFrontProcess (PSN: ProcessSerialNumber): OSErr;
PSN
- The process serial number of the process you want to move to the foreground. This number should be a valid process serial number returned from
LaunchApplication
,GetNextProcess
,GetFrontProcess
,GetCurrentProcess
, or a high-level event. You can also use the constantkCurrentProcess
to refer to the current process.DESCRIPTION
TheSetFrontProcess
function schedules the specified process to move to the foreground. The specified process moves to the foreground after the current foreground process makes a subsequent call toWaitNextEvent
orEventAvail
.If the specified process serial number is invalid or if the specified process is a background-only application,
SetFrontProcess
returns a nonzero result code and does not change the current foreground process.If a modal dialog box is the frontmost window, the specified process remains in the background until the user dismisses the modal dialog box.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSetFrontProcess
function are
Trap macro Selector _OSDispatch $003B SPECIAL CONSIDERATIONS
Do not callSetFrontProcess
interrupt time.RESULT CODES
noErr 0 No error procNotFound -600 Process with specified process serial number doesn't exist or process is suspended by high-level debugger appIsDaemon -606 Specified process runs only in the background