locked
How to Disable the Send and End keys on MC75 RRS feed

  • Question

  • hi

    How to Disable the Send and End keys on MC75 ?

    i need any C# sample code for this

    thanks in advance

    Monday, March 14, 2011 10:55 AM

Answers

  • [DllImport("coredll.dll")]

    static extern bool AllKeys(bool bAllKeys);

     

    /*

    If bAllKeys is set to TRUE, this function allows all keyboard events to be sent to the application. (This includes the soft-key buttons and back button).

    If it is set to FALSE, this function specifies standard keyboard event behavior. Some events including soft-key buttons and the back button are not sent to the application

    */

    void EnableAllKeys(bool bAllKeys ) {

        AllKeys(bAllKeys );

    }

     


    Christian Resma Helle - Commentor A/S
    • Marked as answer by Peter_Yu Tuesday, March 22, 2011 5:03 AM
    Thursday, March 17, 2011 9:59 AM

All replies

  • Use "AllKeys( true );" to send all keyboard input to your application. Your app is now responsible for determining which keys work and which don't. 

    http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2009/07/14/just-say-no-to-gapi-what-you-need-to-know-about-allkeys-and-input-management.aspx

    Be sure to restore they keyboard when you're done blocking it! "AllKeys( false );"

    -PaulH

    Monday, March 14, 2011 6:37 PM
  • thanks for the help !

    but this sample is on C++ and i need C# sample

    can you help me with this

     

     

    Monday, March 14, 2011 7:03 PM
  • The top result looks like a winner:
    http://www.google.com/search?q=%22allkeys%22+c%23+%22windows+mobile%22&safe=strict

    -PaulH

    Monday, March 14, 2011 7:25 PM
  • [DllImport("coredll.dll")]

    static extern bool AllKeys(bool bAllKeys);

     

    /*

    If bAllKeys is set to TRUE, this function allows all keyboard events to be sent to the application. (This includes the soft-key buttons and back button).

    If it is set to FALSE, this function specifies standard keyboard event behavior. Some events including soft-key buttons and the back button are not sent to the application

    */

    void EnableAllKeys(bool bAllKeys ) {

        AllKeys(bAllKeys );

    }

     


    Christian Resma Helle - Commentor A/S
    • Marked as answer by Peter_Yu Tuesday, March 22, 2011 5:03 AM
    Thursday, March 17, 2011 9:59 AM