class for handling the key strike event

  • Thread starter Thread starter a
  • Start date Start date
Can you give us some more information, if I Google for this I get all kind
of wars, if I look this up in Wikepedia I get as well the keys in Florida?
On MSDN I get a lot about key and some things about strike.

Cor
 
For example, when I hit the keyboard at the time I am typing this message,
the application knows which character I have hit. It is the event handling
procedure doing the job. I would like to use the event class for my
application.

Thanks
 
a which application, your application can get the keydowns, and keys up
inside this application, however I have the idea that you want that as it is
in some spyware to registrate all keystrokes somebody does, am I right?

Cor
 
Hi
You are half right, I am creating password recovery tool for myself.
I dont trust the freeware outside.
In C++ for Win98, there is a class called GetAsyncKeyState.
What is it for VB .NET?

Thanks
 
a said:
Hi
For VB .NET, which class is responsible for the key strike event?

What does "key strike" mean?

You may want to check out the form's/control's 'KeyPress', 'KeyDown', and
'KeyUp' events and the form's 'KeyPreview' property.
 
Hi
I want it from the system resources.
Like, if I install my application as the service.
I want to keep track of all the Keydown, no matter which application, Word,
IE or Excel is active.
Just like the GetAsyncKeyState for C++ in Win 9X.
Thanks
 
a said:
I want it from the system resources.
Like, if I install my application as the service.
I want to keep track of all the Keydown, no matter which application,
Word,
IE or Excel is active.
Just like the GetAsyncKeyState for C++ in Win 9X.

You can still use 'GetAsyncKeyState':

<URL:http://dotnet.mvps.org/dotnet/faqs/?id=getkeystate&lang=en>

Alternatively you'll may want to install a system-wide Win32 keyboard hook.
However, note that it's maybe better to implement the hooking code in C for
determined runtime behavior.
 
Hi
How come my .NET reference book doesnt mention this feature? Should I look
for books called something like Win32 programming for WinXP?
Thanks
 
a said:
How come my .NET reference book doesnt mention this feature? Should I look
for books called something like Win32 programming for WinXP?

Look for keywords like "Win32", "platform invoke", "p/invoke" or similar in
the books' descriptions.
 
a said:
Hi
I want it from the system resources.
Like, if I install my application as the service.
I want to keep track of all the Keydown, no matter which application, Word,
IE or Excel is active.
Just like the GetAsyncKeyState for C++ in Win 9X.

You need to install a WH_KEYBOARD_LL hook to monitor key events across all
applications. There are no native .NET functions that will do this for you.
You will need to use pinvoke to access the appropriate Win32 and User32
functions.

We offer a component that will do this for you:

http://www.mini-tools.com/goto/input
 
Back
Top