none
corresponding button name and real key on smartphone

    Question

  • Hi, I am beginning study to develope smartphone. I got confused about the corresponding button name to the real key on  keyboard. I found that the VK_TBACK corresponds the 'back key' on keyboard. but what  VK_TSOFT1,VK_TSOFT2 and VK_TRECORD stand for? Where can I get these information ?

     

    VK_TBACK Back button
    VK_TSOFT1 Left SoftKeyBar button
    VK_TSOFT2 Right SoftKeyBar button
    VK_TVOLUMEUP Up volume button
    VK_TVOLUMEDOWN Down volume button
    VK_TRECORD Record button

     

    When I click the button named 'soft Key1' just under the phone's screen, it created function menuItem1_click(). is this 'soft Key1' corresponds VK_TSOFT1 or not? In function search_KeyDown(), which keys are the System.Windows.Forms.Keys.F1 and System.Windows.Forms.Keys.F1 stand for?

     

     

     

    I want to change the behavior of clicking enter key on the keyboard, Can I just write some codes in if ((e.KeyCode == System.Windows.Forms.Keys.Enter)) in search_KeyDown()?

     

    Thanks very much .

    Thursday, August 21, 2008 4:04 AM

Answers

  • Hi

     

    When I click the button named 'soft Key1' just under the phone's screen, it created function menuItem1_click(). is this 'soft Key1' corresponds VK_TSOFT1 or not?

     

    Yes, it is. VK_TSOFT1 is “soft key 1” (i.e. left soft key). Open the c:\Program Files\Windows Mobile 6 SDK\Smartphone\Include\Armv4i\winuserm.h header file and you can find its definition.

     

    If you have Win32 programming experience, create a Win32 project and process the WM_KEYDOWN message and check it yourself.

     

    In function search_KeyDown(), which keys are the System.Windows.Forms.Keys.F1 and System.Windows.Forms.Keys.F1 stand for?

     

    The F1 key is soft key 1. You can find in the winuserm.h file that VK_F1 == VKTSOFT1. You can also verify this by debugging a .NET CF project and looking at the value of e.KeyCode.

     

    want to change the behavior of clicking enter key on the keyboard, Can I just write some codes in if ((e.KeyCode == System.Windows.Forms.Keys.Enter)) in search_KeyDown()?

     

    Yes. It’s not hard to test in the KeyDown event.

     

    Regards

    Chunsheng Tang

     

    Monday, August 25, 2008 6:18 AM

All replies

  • Hi

     

    When I click the button named 'soft Key1' just under the phone's screen, it created function menuItem1_click(). is this 'soft Key1' corresponds VK_TSOFT1 or not?

     

    Yes, it is. VK_TSOFT1 is “soft key 1” (i.e. left soft key). Open the c:\Program Files\Windows Mobile 6 SDK\Smartphone\Include\Armv4i\winuserm.h header file and you can find its definition.

     

    If you have Win32 programming experience, create a Win32 project and process the WM_KEYDOWN message and check it yourself.

     

    In function search_KeyDown(), which keys are the System.Windows.Forms.Keys.F1 and System.Windows.Forms.Keys.F1 stand for?

     

    The F1 key is soft key 1. You can find in the winuserm.h file that VK_F1 == VKTSOFT1. You can also verify this by debugging a .NET CF project and looking at the value of e.KeyCode.

     

    want to change the behavior of clicking enter key on the keyboard, Can I just write some codes in if ((e.KeyCode == System.Windows.Forms.Keys.Enter)) in search_KeyDown()?

     

    Yes. It’s not hard to test in the KeyDown event.

     

    Regards

    Chunsheng Tang

     

    Monday, August 25, 2008 6:18 AM
  •  

    Thanks very much!
    Tuesday, September 02, 2008 3:09 AM