Try mapping your application to all of your application 
buttons.

Here's how you can do that:

PrefSetPreference( prefHard2CharAppCreator, appFileCreator );
Where appFileCreator is defined as your creator id (aka STRT).
This example sets your application to the 2nd application button,
the others are:
prefHard1CharAppCreator
prefHard3CharAppCreator
prefHard4CharAppCreator

The power key itself isn't in the SystemPreferencesChoice structure,
but the character is:

hardPowerChr
and you can do a keymask type thing for that if you wanted to.

if (event.eType == keyDownEvent && 
event.data.keyDown.chr == hardPowerChr &&
!(event.data.keyDown.modifiers & poweredOnKeyMask))
{
        // Do whatever you want
}
However, taking complete control of the buttons may not always be
the kind of thing you really want to do to your users...they pay
good money for a handheld computer, and they don't want to be stuck
in one persistant program.  Perhaps you could map 1 application 
button of your choice to your app, then label that button with your 
application as a application loading button?

-Rus

>-----Original Message-----
>From: Dinesh [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, June 29, 2000 12:31 AM
>To: Palm Developer Forum
>Subject: Auto-startup (when device turns on)
>
>
>Hi,
>
>    Hw do I  launch my application when palm turns on every time.
>
>Thanks in Advance,
>
>Dinesh.
>
>
>
>
>
>-- 
>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