Hello Kevin,

             In order to find when the Palm goes into sleep mode for devices
working on something less than OS 3.5 you have to do patch the interrupts.
The other way round is to write your shared libraries which will receive
notfication about the device status. Hope it helps.

Khurram


----- Original Message -----
From: Kevin Mckee <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Sunday, May 27, 2001 11:56 PM
Subject: Sleep mode handling.


> I need help with the "sleep mode" of the Palm OS (I know this works only
in
> OS 3.5 and higher).
>
> I need to "catch" the OS when it goes into sleep mode in order to initiate
> my password lock screen.
>
> IE.  When the Palm goes into sleep mode, I want to change screens and
> display my login screen when the user presses the power button.
>
> How do I handle this?  An example would be GREAT.
>
> Here is how I handle the physical power off...
>
> static void HandlePowerOff(EventPtr event)
> {
> file://FormPtr loginFrm = FrmInitForm(LoginForm);
>     if(event->eType==keyDownEvent)
>     {
>     if(event->data.keyDown.chr==hardPowerChr)
> {
> // if (loginFrm)
> // HandleRecordSave(); // Works ok if you are in the "LoginForm" but
> crashes
> // if you are in any other form.
> FrmCloseAllForms();
>             changeForm(StartForm);
> }
> }
>     lastEventTime=TimGetSeconds();
> }
>
> Regards,
> Kevin Mckee
> [EMAIL PROTECTED]
> http://www.fortsoft.com
>
>
>
> --
> 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/

Reply via email to