Hi,
    I have tried handling Hard Buttons within AppEventLoop instead of
FormEventHandler. Its working fine. Please try the following codes.

-----------------------------------
static void AppEventLoop(void)
{
 UInt16 error;
 EventType event;

 do {
  EvtGetEvent(&event, evtWaitForever);
  if (event.eType == keyDownEvent)
  {
  if (event.data.keyDown.chr >= hard1Chr && event.data.keyDown.chr <=
hard4Chr )     //  Handling Hard Buttons
           continue;
  }
  if (! SysHandleEvent(&event))
   if (! MenuHandleEvent(0, &event, &error))
    if (! AppHandleEvent(&event))
     FrmDispatchEvent(&event);

 } while (event.eType != appStopEvent);
}
-------------------------------

Thanks,
Manikumar K

Developers' Nation DTS Engineer
www.devnation.net
Developers' Nation is the fastest, most reliable and affordable way to
resolve your technical issues



"Vijay Raghavan" <[EMAIL PROTECTED]> wrote in message
news:51331@palm-dev-forum...
>
> 1. Yes I have returned true value
> 2. I am able to  handle the silk screen and hard key down events in the
event handler of the form and do nothing in that , but still the application
quits and responds to Launcher and Calculator and other hard keys.
> I have pre-empted the System handling the events like this
> if (bFormOPen==true)
> // Don't give the system a chance to handle the event.
>  FrmDispatchEvent(&event);
> if (! SysHandleEvent(&event))
> :
> :
>  While debugging I found that the application quits in the while-do loop
of the event loop as the condition 'while (event.eType != appStopEvent);' is
met as soon as the  hard/silk Buttons are pressed
> Probably because the launcher applications etc send appStopEvent before
launching?
> 3. I have gone thru the article
http://oasis.palm.com/dev/kb/papers/1148.cfm
> but still don't know why my appl quits.
> thanks a lot in anticipation
>
> _____________________________________________________
> Chat with your friends as soon as they come online. Get Rediff Bol at
> http://bol.rediff.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