|
-
Apr 20th, 2000, 02:05 AM
#1
Thread Starter
New Member
How would I make a program that catches everything that happens with the Keyboard (when someone presses a key) and put it all into a textbox. This sounds easy, but the catch is: I want it to be able to do this without having the focus on my program. So I could type in Notepad and it would all show up in my program too.
~Stoinker~
-
Apr 20th, 2000, 03:06 AM
#2
Fanatic Member
Erm...
I don't think it's possible, actually.
[Edited by V(ery) Basic on 04-20-2000 at 09:21 AM]
-
Jun 7th, 2000, 04:05 PM
#3
New Member
Capture Keyboard Input: Notepad
There is a demo that does basically this exact thing at: http://seduto.hypermart.net. Look under Hook 99 v2.
Hope that helps....
-
Jun 7th, 2000, 09:55 PM
#4
Hyperactive Member
I think that is a tough one. To capture keys on the keyboard, the KeyPress Event() must be used, but your program must have the focus or the keys you press will be associated with Notepad, your program with focus. The only suggestion I have is to set a timer that will read your keys from Notepad. Is that what yo are doing?? Wanting everything you type in notepad to appear in a TextBox in VB??
-
Jun 7th, 2000, 10:54 PM
#5
Junior Member
-
Jun 8th, 2000, 02:59 AM
#6
Thread Starter
New Member
It sounds like a password stealer because it would work exactly as a password stealer would. In case you were curious, the real reason I was making this program is to try to add that "intellitype" ability to a very limited Online RPG that I play, so I can start typing something and it will fill in the rest logically (like the way most browsers fill in the rest of a url as you type it in.)
~Stoinker~
-
Jun 8th, 2000, 03:24 AM
#7
I think you have two options to do this.
One is using a timer with the interval set to a small value, and use the GetAsyncKeyState api function. Search this forum and I'm sure you can find some samples.
The other is by using a system wide hook. Unfortunately most system wide hooks have to be located in a C dll. The only one available to vb is a Journalrecord hook. This hook type is used to record macro's. I posted an example for catching mouse move events in this thread:
http://forums.vb-world.net/showthrea...threadid=15494
I think if you dive a bit deeper in the WM_KEYDOWN (&H100) messages, you could rewrite it for catching keyboard events.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|