Trouble with hooks |
Post Reply |
Author | |
ahora
Groupie Joined: 17 March 2006 Status: Offline Points: 23 |
Post Options
Thanks(0)
Posted: 22 February 2007 at 3:11am |
Hi,
When I active the capture of windows hooks with SetWindowsHookEx(WH_KEYBOARD, AddressOf KeyboardHook, 0, aAppThreadID) and I cath them, the key shortcuts of the CommandBar or any key, that I have configured, don't work ok, like for example a ALT+S of a "save button". The CommandBars don't capture any key like "return" or cursor keys when it have the focus. Regards. P.D.: Sorry my bad english |
|
ahora
Groupie Joined: 17 March 2006 Status: Offline Points: 23 |
Post Options
Thanks(0)
|
Hi,
Anybody knows the solution???!!? Regars. |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
Hello ahora
this works for me in VB6:
hHook=SetWindowHooksEx(WH_KEYBOARD, AddressOf KbHook, App.hInstance, App.ThreadID)
In Function KbHook(Code, Param1, Param2):
KBHook=CallNextHookEx(hHook,Code,Param1,ByVal Param2)
Your code
I hope this helps
Fabian
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
ahora
Groupie Joined: 17 March 2006 Status: Offline Points: 23 |
Post Options
Thanks(0)
|
uploads/20070306_102355_TestHooks.zip
Here is an example to view the error when you turn on the hooks. Regards. |
|
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
Try ByVal on Param2 calling CallNextHookEx(hHook,Code,Param1,ByVal Param2)
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You call CallNextHookEx 2 times. and use wrong "lParamComa" instead "lParam" etc.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
ahora
Groupie Joined: 17 March 2006 Status: Offline Points: 23 |
Post Options
Thanks(0)
|
Oh oh oh yeeees
Thank you! |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |