01.
Private
Shared
Function
KeyBoardHookProc(
ByVal
nCode
As
Integer
,
ByVal
wParam
As
Integer
,
ByVal
lParam
As
IntPtr)
As
Integer
02.
03.
04.
05.
If
nCode < 0
Then
06.
Return
CallNextHookEx(HookId, nCode, wParam, lParam)
07.
End
If
08.
09.
10.
11.
12.
13.
Dim
KeyboardSruct
As
KBDLLHOOKSTRUCT = Marshal.PtrToStructure(lParam,
GetType
(KBDLLHOOKSTRUCT))
14.
15.
If
KeyboardSruct.vkCode = Vk_Tab
And
My.Computer.Keyboard.AltKeyDown
Then
16.
17.
Return
1
18.
ElseIf
KeyboardSruct.vkCode = Vk_Escape
And
My.Computer.Keyboard.CtrlKeyDown
Then
19.
20.
Return
1
21.
End
If
22.
23.
24.
Return
CallNextHookEx(HookId, nCode, wParam, lParam)
25.
26.
End
Function