Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: RE: Keyboard Hook problem


Message #1 by Alastair Vance <avance@c...> on Fri, 21 Jun 2002 16:05:52 +0100
Research focusing on the WM_KEYUP or WM_KEYDOWN windows message 
(WH_KEYBOARD hook).  I would suggest that you lean toward the keyup 
becaue if the user holds the key, Windows will REPEAT the keystroke.

Best advice I can give is that you purchase the book titled "Subclassing 
and Hooking with Visual Basic" (O'Reilly, Teilhet) which has a LOT of 
detail around this OR if you have access to Desaware SpyHook, it is much 
easier to do what you suggest (at a cost) OR use Google or MSDN and 
search for code samples using the constants I mentioned in first 
paragraph.

R


> i hv created a function to trap the pressing of the BackSpace key by a 
u> ser.Everyhting is working fine,except that my function is being called 
t> wice.Once when the BackSpace key is PRESSED and the next when it is 
R> ELEASED.

> I dont want to call my function when the BackSpace key is RELEASED.I am 
c> alling my functions inside KeyboardProc function.

> any help how to avoid calling my function when backspace key is 
released??

> regds,
a> shay

  Return to Index