M
Molalla Attenborough
Hello, a little help would be greatly appreciated.
I have implemented a global kb hook class into my vb.net application.
(more info:
Processing Global Mouse and KB Hooks in C#
http://www.codeproject.com/csharp/globalhook.asp)
Anyway, George's hook raises an event in my.net application
whenever a key is pressed. Here is what I need to do -
I want my application to be running in the background.
I want to watch for keypresses in *specific applications*.
Therefore, what I need to do is extract the name of the
current foreground window so I can evaluate it as a string.
So the code would go in here...
Public Sub KeyDown(ByVal sender as object, ByVal e as KeyEventArgs) Handles MyHook.KeyDown
console.writeline("Key pressed was - " + e.keyvalue.tostring)
console.writeline("Key was pressed in application named - " + [INSERT CODE HERE])
End Sub
Remember, my little application does not have the focus.
Thanks!
I have implemented a global kb hook class into my vb.net application.
(more info:
Processing Global Mouse and KB Hooks in C#
http://www.codeproject.com/csharp/globalhook.asp)
Anyway, George's hook raises an event in my.net application
whenever a key is pressed. Here is what I need to do -
I want my application to be running in the background.
I want to watch for keypresses in *specific applications*.
Therefore, what I need to do is extract the name of the
current foreground window so I can evaluate it as a string.
So the code would go in here...
Public Sub KeyDown(ByVal sender as object, ByVal e as KeyEventArgs) Handles MyHook.KeyDown
console.writeline("Key pressed was - " + e.keyvalue.tostring)
console.writeline("Key was pressed in application named - " + [INSERT CODE HERE])
End Sub
Remember, my little application does not have the focus.
Thanks!