Alexander Foborg <[EMAIL PROTECTED]> wrote:
> I need to know when the user turns on/off the backlight while my application
> is running. According to hardware.h, the virtual key backlightChr is sent
> when a change of backlightstate is requested.
>
> I tried to catch this virtual key in my formeventhandler, but I never
> recieved it. After a while, i figured out that the event is swallowed by
> SysHandleEvent. If I put the call to my virtualkeysHandler in the
> AppEventLoop before SysHandleEvent (see code below), I get the
> backlightChr-event. I'd rather put the call where it should be, in the
> formeventhandler.
Does your app have more than one form? Do you want your app to do the
same thing upon backlight on/off regardless which form is up? If so,
then where you have your backlightChr detection is right where it
should be.
Where you actually take action on the event is a different matter. If
you do indeed want to do different things depending upon which of your
forms is up, you could detect the backlightChr in your main event loop,
and feed a new event into the queue (one that you've defined
specifically for this purpose). Then your form event handler(s) could
process this new event accordingly.
--
Roger Chaplin
<[EMAIL PROTECTED]>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html.