Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Software Development Software Development
Search Search
Search for:
Tech Support Guy > > >

Solved: Full keyboard capture in vb


(!)

Wondered2001's Avatar
Wondered2001 Wondered2001 is offline
Junior Member with 7 posts.
THREAD STARTER
 
Join Date: Oct 2008
Location: Canada
Experience: Intermediate
09-Oct-2008, 02:06 AM #1
Solved: Full keyboard capture in vb
Hi there, I've looked and cant find anything...maybe one of you do. Is there a way to have a VB program capture ALL keyboard input? I wrote a program to prevent my kids from randomly clicking things, which works unless they get the windows key which bypasses the whole point of the program. Eventually I will rewrite in VC++ so any help towards that would be appreciated as well
-Fabez-'s Avatar
Senior Member with 1,899 posts.
 
Join Date: Jul 2008
Location: Earth
Experience: General
09-Oct-2008, 02:30 PM #2
Why do you want to make a global keyboard hook ?
Wondered2001's Avatar
Wondered2001 Wondered2001 is offline
Junior Member with 7 posts.
THREAD STARTER
 
Join Date: Oct 2008
Location: Canada
Experience: Intermediate
10-Oct-2008, 01:52 AM #3
I wrote a program to let my kids randomly click things, which works unless they get the windows key which bypasses the whole point of the program. not worried about catching multiple keys like ctrl/alt/delete, just dont want to keep having to barricade computer if I walk away from computer for a minute. can show coding to date if you're interested
Wondered2001's Avatar
Wondered2001 Wondered2001 is offline
Junior Member with 7 posts.
THREAD STARTER
 
Join Date: Oct 2008
Location: Canada
Experience: Intermediate
10-Oct-2008, 02:19 AM #4
btw, realizing potential for creating problems if code is given out... if you're not comfortable telling, I'm still looking on my own and eventually will make it work. Was hoping to finish before kids are old enough to help me is all ;-)
-Fabez-'s Avatar
Senior Member with 1,899 posts.
 
Join Date: Jul 2008
Location: Earth
Experience: General
10-Oct-2008, 02:31 PM #5
Im comfortable telling you, I just dont fully get why you want to monitor all of the keys that are pressed on your computer.
Wondered2001's Avatar
Wondered2001 Wondered2001 is offline
Junior Member with 7 posts.
THREAD STARTER
 
Join Date: Oct 2008
Location: Canada
Experience: Intermediate
17-Oct-2008, 02:23 AM #6
sorry for delay in response. The program is supposed to let the kids hit any key on keyboard or click any button on mouse, without me worrying about them deleting the folder holding all their photos or who knows what. basically it puts a full screen image on screen that changes colors randomly when any key is hit, mouse wheel scrolled... whatever. It works great except for if the windows key is hit... it bypasses the whole program bringing up the taskbar and potentially lets em click on anything. I wrote it originaly to amuse daughter who found it fun, the 1yr old son has a definite passion for the keyboard and has literaly climbed stuff I couldnt to get past the barriers we put in his way. A little wordy, but hope reason is clearer. I did find a low level keyboard hook that should work, but if you have an easier way to catch the windows key I'd love to hear it.
pvc_'s Avatar
pvc_ pvc_ is offline
Computer Specs
Member with 483 posts.
 
Join Date: Feb 2008
Location: Los Angeles, CA
20-Oct-2008, 12:24 AM #7
If you can currently get the key code for the Windows Key ( I dont know how you implemented the program that you have right now), then you can resize the form to get the focus back. Do a quick resize, and then maximize the windows again. Another good trick is to send a pop up message to the screen to get the focus back and get rid of the start menu.

I usually code this kind of stuff in .net and to get the key code, I just use the Form_KeyDown event, and the "e" argument that is passed to it.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
vb 2005 express

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑

Content Relevant URLs by vBSEO 3.3.2