VB.Net Keyboard Hooking

A

AnilKumar

hi all,
i am implementing keyboard hooking in our application using
VB.NET through 'setwindowshookex' api. It is working fine. But i have
got one problem, it is like this...
i am displaying a message box whenever a user presses a key, i.e. when
a user presses key 'A', i am capturing its keycode and based on it i
am displaying that the key pressed is A. But the problem is the
messagebox is displayed twice for each keystroke. i.e. when i press
'A' once i am getting the messagebox (saying 'A' has been pressed)two
times. I tried out to find a solution but i couldn't. Someone please
help me out in sorting out this problem. This is very Urgent!!!!
Thanking You
Anylcumar.
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (AnilKumar) scripsit:
i am implementing keyboard hooking in our application using
VB.NET through 'setwindowshookex' api. It is working fine. But i have
got one problem, it is like this...
i am displaying a message box whenever a user presses a key, i.e. when
a user presses key 'A', i am capturing its keycode and based on it i
am displaying that the key pressed is A. But the problem is the
messagebox is displayed twice for each keystroke. i.e. when i press
'A' once i am getting the messagebox (saying 'A' has been pressed)two
times. I tried out to find a solution but i couldn't. Someone please
help me out in sorting out this problem. This is very Urgent!!!!

There is more than one message received by the hook if a key is
pressed. Can you post some code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top