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)
{
//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/

Reply via email to