You need to post the event to the queue, as Brian suggested is his sample
code (call EvtAddEventToQueue). You can post an appStopEvent, and in most
cases, it'll switch to the last running application. If you want it to
switch to the Launcher every time, you can use SysUIAppSwitch. You need to
take care to support third party launchers. Or you could post a power off
key, and it'll turn the device off without exiting your application.
Of course, the norm for most Palm applications is to leave it running until
the user explicitly chooses some other application to run, at which point
you'll receive an appStopEvent. Palm applications should not have exit
buttons! Palm users shouldn't have to think about saving files or quitting
applications. That's part of the Zen of Palm design philosophy.
-
Peter Epstein
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/