-
December 1st, 2008, 03:34 PM
#1
"Baby Entertainment" program
Howdy, Y'all!
I'm new here. I'm also new to VB .net 3.5 SP1 programming, but not new to programming in general.
I want to make a program for my baby daughter. She likes to sit on Daddy's lap and mash the keyboard. Unfortunately, this can produce undesired results for Daddy! So, what I want to do, is create a program that captures ALL keystrokes (Including and especially the Windows key, the Alt-Menu Key), and play a neat noise and maybe flash a neat graphic on the screen.
I've begun with a very simple thing like this:
Code:
Public Class Form1
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal bubba As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If bubba.KeyCode = Keys.F1 Then
My.Computer.Audio.Play("c:\wav\falling.wav", AudioPlayMode.Background)
End If
End Sub
End Class
The problem with this simple code is that when the Windows key is depressed or the Alt-Menu key, it takes the focus away from the VB form itself. I don't want this. How can I capture/prevent that behavior?
I found an earlier post, from 2001, but it consisted of Graham bringing up a debate on "Why you shouldn't assume you know more than the user". In this case, the user is either myself, who knows exactly what I want, or my daughter, who quite frankly, doesn't. (Or, if she does, she can't tell me, unfortunately!) hehe!
-
December 1st, 2008, 03:46 PM
#2
Re: "Baby Entertainment" program
We can't post code that performs KEY LOGGING, as it's against the AUP.
I'd suggest another keyboard for her (that isn't plugged in.)
Then you can do random things that she THINKS she's causing, and entertain herself.
-
December 1st, 2008, 04:09 PM
#3
Re: "Baby Entertainment" program
Ha ha!
She is smarter than that. She knows that the OTHER keyboard is the REAL keyboard (Made the mistake of using both simultaneously).
Who is the AUP?
-
December 1st, 2008, 05:11 PM
#4
Re: "Baby Entertainment" program
At the bottom of every page:
Acceptable Use Policy
-
December 1st, 2008, 05:31 PM
#5
Re: "Baby Entertainment" program
OK.
Well, I understand you don't want to help bad people. Quite frustrating to hit a dead end after registering. Too bad I'm just a guy who wants to entertain his kid.
I guess I'll have to go find some 1337 h4x70r forums to learn this.
-
December 1st, 2008, 05:36 PM
#6
Re: "Baby Entertainment" program
Easier to teach her NOT to touch something, then to possibly help design the next-best key-logger to hit the markets
-
December 2nd, 2008, 02:11 AM
#7
Re: "Baby Entertainment" program
Originally Posted by schmeckendeugler
OK.
Well, I understand you don't want to help bad people. Quite frustrating to hit a dead end after registering. Too bad I'm just a guy who wants to entertain his kid.
I guess I'll have to go find some 1337 h4x70r forums to learn this.
Don't give up so quickly .... There are other methods to do what you want ...
I did a quick search and picked up these two threads...
Disable Windows ctrl, Alt, del Keys... & How to show my project on the "Top Layer" ...
Check out HannesTheGreat's posts in those two threads... I'm sure you will be able to use that code as is and simply add the play/ draw stuff in yourself...
Search Functions return a lot of good info often..
Gremmy..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
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
|