
FB II Compiler
PG PRO
Debugging
Memory
System
Mathematics
Resources
Disk I/O
Windows
Controls
Menus
Mouse
Keyboard
Text
Fonts
Drawing
Sound
Clipboard
Printing
Communication
ASM |
SYSTEM
Stop an application to be switched to the background
Well, one thing that comes to mind is that you can always call the process manager to bring your app forward whenever you get a "suspend" event...
CLEAR LOCAL
LOCAL FN TAppInFront
DIM process.procSerNumRecSize
DIM tProcess.procSerNumRecSize
DIM osErr, sameProc
process.psnHigh& = 0
process.psnLow& = _kNoProcess
tProcess.psnHigh& = 0
tProcess.psnLow& = _kCurrentProcess
osErr = FN GetCurrentProcess(tProcess)
osErr = FN GetFrontProcess(process)
osErr = FN SameProcess(tProcess, process, sameProc)
END FN = sameProc
CLEAR LOCAL
LOCAL FN TAppToFront
DIM osErr, tProcess.procSerNumRecSize
tProcess.psnHigh& = 0
tProcess.psnLow& = _kCurrentProcess
osErr = FN GetCurrentProcess(tProcess)
osErr = FN SetFrontProcess(tProcess)
END FN
The thought police will get you...
HIG don't say to do this (from memory)
If you need your app to stay the front process then modal dialog or alert is the way to go
|