locked
I Want to Disable Hardware Button Events in My Windows Mobile . Please Help RRS feed

  • Question

  • Hi All,

    I am developing an App in VC# in VS2008 for Windows Mobile (HTC HD Mini). And I want to disable all the Hardware Key events while my apps is launched.

    It is getting dofficult for me . I searched in Google but still I cant get any solution for this.

    I can get one Hardkey Event ("CANCEL BUTTON EVENT") using:

     

    private

     

    void OnKeyUp(object sender, KeyEventArgs e)

    {

    switch(e.KeyData)

    {

    case (Keys)CANCEL_BUTTON :  // CAncel Button Key Data = 115

     break;

    }

    }

    when Cancel Button is Pressed, I am able to trap the event in "OnKeyUp() " given above.

    But , I am unable to disable this event.

    I can show the MessageBox using this event on My app. When i am pressing the OK in the Message Box, it is not going out of my app i.e. my app is still running.

    But when I am not showing any MessageBox , it is going out of app i.e. my app is being closed.

     

    Please help me to solve this.

     

    And for BACK,HOME,CALL,START Key , i am not even able to trap the event.

     

    Please help me . If anybody can provide any help (sample code or app) , it will be very much helpful for me.

    Thanks in advance.

     

     

    Regards,

    B Kundu  

     

    Tuesday, December 21, 2010 6:54 AM

All replies