This worked for me. Anyone of more seasoned head see anything particularly
icky here?
EvtGetEvent(&event, evtWaitForever);
if(event.eType == keyDownEvent)
{
if(event.data.keyDown.chr == hardPowerChr ||
event.data.keyDown.chr == autoOffChr)
{
// Do something in response to the power off,
// then let the system handle it normally.
}
}
-P
-----Original Message-----
From: Lance Jin [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 02, 2000 10:56 AM
To: Palm Developer Forum
Subject: how to capture power-off on 3.1
Hi, all,
In my application, is there a way to get notified or capture the event
when the device is turned off by the user or the device goes auto-off?
This is on palm OS 3.1. I looked into "Notification Manager", but
it didn't seem to work under 3.1.
Many thanks!!
____
Regards,
Lance J.
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/