Results 1 to 7 of 7

Thread: Mapping buttons

  1. #1

    Thread Starter
    Junior Member sakishrist's Avatar
    Join Date
    Apr 2008
    Posts
    28

    Lightbulb Mapping buttons

    Hello,
    What I need to do is to make my application use some of the device's buttons (including the 'yes' and 'no' buttons) and not let any other application use those buttons as usual even if my application is in the background. is there any way to do that? I use VB.NET.
    Thanks!

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Mapping buttons

    There is an API "keybd_event" i think that also works with the CF coredll.
    Apo elllada?
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3

    Thread Starter
    Junior Member sakishrist's Avatar
    Join Date
    Apr 2008
    Posts
    28

    Smile Re: Mapping buttons

    I will try to make it work, Thanks.
    Nai, apo ellada (peripou).

  4. #4

    Thread Starter
    Junior Member sakishrist's Avatar
    Join Date
    Apr 2008
    Posts
    28

    Re: Mapping buttons

    I found a bit of information about 'keybd_event' here and i saw the MapVirtualKey Function. Is that one going to help me? I have not tested any of these functions yet.

  5. #5
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Mapping buttons

    I don't think that MapVirtualKey Function is supported in CF.
    keybd will help you Simulate a keystroke,yes.
    Apo po pou re si? EllinoAmerik?
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  6. #6

    Thread Starter
    Junior Member sakishrist's Avatar
    Join Date
    Apr 2008
    Posts
    28

    Re: Mapping buttons

    So ... will that make all other programs NOT accept that keystroke? ... I need to make my program to be the only one that will accept it even if it is in the background.

  7. #7
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Mapping buttons

    I don't know for sure. Never tried it but most probably you will have a problem if your app is in the background. Give it a try and let us know and will try to help.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width