hook Keyboard , to AlexY and any helper

Hi,

Could anybody tell me please how to use Alex Yakhnin hookkeys class.

http://blog.opennetcf.org/ayakhnin/PermaLink.aspx guid=84b95802-76d7-499c-b266-e2251ab15706

i want my application to detect any key pressed in the keyboard, even if the application was in the background.

thanks in advance.




Answer this question

hook Keyboard , to AlexY and any helper

  • ciocc

    What's the problem
  • pardgr8

    A few things to note. This keyboard hook catches only the hardware keys, i.e. the SIP presses will not be catched. The vkCode member of the KeyBoardInfo structure that is returned as a parameter of the HookEvent contains an ASCII code of the key that could be converted to the char. But you will need to add a few more checks. Take a look at this link for ideas:

    http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21284733.html


  • smc750

    Hi all, is there any possiblility to detects if the pocket PC has a hardware keyboard, instead of the SIP

    Thanks in advance.



  • Leebert

    Dear Alex,

    thanks for replaying, i want to catch the button pressed in the SIP could you please tell me how to do this

    thanks



  • wolfsch

    Dear Alex,

    I still didn't lose hope and waiting for your answer.

    thanks



  • b-man

    Dear Alex,

    Why didn't you reply, i need your help please.

    thanks



  • IXOYE333

    This is done on the application level. The CF v2 includes the KeyPreview property that enables receiving the keypresses from any control on the form.
  • WolframW

    Dear Alex,

    thanks for replying, i am trying to make a program that monitors pocket pc activities including taking screen shots and monitoring keystrocks, don't worry not for evil reasons, so the software will be running in the background and i'd like it to capture keys pressed in the SIP mainly and hardware keys (optional), and send the value of the keys pressed to a textbox for example, so when the user types "hello" any where in the operating system, my software captures the keys he pressed, and the result will be a textbox in my software containing the "hello" word that he typed.

    Please help me,

    thanks in advance,



  • Steve100100101

    Could you explain a little bit more your requirements What your application supposed to do

    Do you need to get all key presses on the SIP or just some And why do you think you need to do that on a global level


  • Marlin7

    Dear Alex,

    but i want to receive keypresses even if my application doesn't have the focus i.e. running in the background, does this KeyPreview works when the application runs in the background.

    Please Alex help me, you are my only hope i have searched the web for long bitter nights invain with no results.

    Please help

    thanks



  • pwinant

    Dear AlexY,

    thanks for replying, please tell me how to use your code to capture pressed keyboard key and enter them into textbox for example.

    for example if the "a" key is pressed then TextBox1 becomes = "a" and so on, and of course i'd like this to work wether my application has the focus or it is in the background.

    I appreciate your help very much,

    thanks in advance,



  • hook Keyboard , to AlexY and any helper