12-23-2010, 03:20 PM
12-25-2010, 09:39 PM
Very nice source even tho this thread is really
old can always come in handy for someone
old can always come in handy for someone
01-03-2011, 03:01 PM
Good Source
If You don't mind
I just post something i added to determine if caps or shift key is holded:
If You don't mind
I just post something i added to determine if caps or shift key is holded:
Quote:Private Sub kbHook_KeyDown(ByVal Key As System.Windows.Forms.Keys) Handles kbHook.KeyDown
If TextBox2.Text = "False" Then
If TextBox3.Text = "False" Then
If Key = Keys.A Then
TextBox1.Text = TextBox1.Text & "a"
ElseIf Key = Keys.B Then
TextBox1.Text = TextBox1.Text & "b"
ElseIf Key = Keys.C Then
TextBox1.Text = TextBox1.Text & "c"
ElseIf Key = Keys.D Then
TextBox1.Text = TextBox1.Text & "d"
ElseIf Key = Keys.E Then
TextBox1.Text = TextBox1.Text & "e"
ElseIf Key = Keys.F Then
TextBox1.Text = TextBox1.Text & "f"
ElseIf Key = Keys.G Then
TextBox1.Text = TextBox1.Text & "g"
ElseIf Key = Keys.H Then
TextBox1.Text = TextBox1.Text & "h"
ElseIf Key = Keys.I Then
TextBox1.Text = TextBox1.Text & "i"
ElseIf Key = Keys.J Then
TextBox1.Text = TextBox1.Text & "j"
ElseIf Key = Keys.K Then
TextBox1.Text = TextBox1.Text & "k"
ElseIf Key = Keys.L Then
TextBox1.Text = TextBox1.Text & "l"
ElseIf Key = Keys.M Then
TextBox1.Text = TextBox1.Text & "m"
ElseIf Key = Keys.N Then
TextBox1.Text = TextBox1.Text & "n"
ElseIf Key = Keys.O Then
TextBox1.Text = TextBox1.Text & "o"
ElseIf Key = Keys.P Then
TextBox1.Text = TextBox1.Text & "p"
ElseIf Key = Keys.Q Then
TextBox1.Text = TextBox1.Text & "q"
ElseIf Key = Keys.R Then
TextBox1.Text = TextBox1.Text & "r"
ElseIf Key = Keys.S Then
TextBox1.Text = TextBox1.Text & "s"
ElseIf Key = Keys.T Then
TextBox1.Text = TextBox1.Text & "t"
ElseIf Key = Keys.U Then
TextBox1.Text = TextBox1.Text & "u"
ElseIf Key = Keys.V Then
TextBox1.Text = TextBox1.Text & "v"
ElseIf Key = Keys.W Then
TextBox1.Text = TextBox1.Text & "w"
ElseIf Key = Keys.X Then
TextBox1.Text = TextBox1.Text & "x"
ElseIf Key = Keys.Y Then
TextBox1.Text = TextBox1.Text & "y"
ElseIf Key = Keys.Z Then
TextBox1.Text = TextBox1.Text & "z"
ElseIf Key = Keys.Space Then
TextBox1.Text = TextBox1.Text & " "
End If
End If
End If
If TextBox2.Text = "False" Then
If TextBox3.Text = "True" Then
If Key = Keys.A Then
TextBox1.Text = TextBox1.Text & "A"
ElseIf Key = Keys.B Then
TextBox1.Text = TextBox1.Text & "B"
ElseIf Key = Keys.C Then
TextBox1.Text = TextBox1.Text & "C"
ElseIf Key = Keys.D Then
TextBox1.Text = TextBox1.Text & "D"
ElseIf Key = Keys.E Then
TextBox1.Text = TextBox1.Text & "E"
ElseIf Key = Keys.F Then
TextBox1.Text = TextBox1.Text & "F"
ElseIf Key = Keys.G Then
TextBox1.Text = TextBox1.Text & "G"
ElseIf Key = Keys.H Then
TextBox1.Text = TextBox1.Text & "H"
ElseIf Key = Keys.I Then
TextBox1.Text = TextBox1.Text & "I"
ElseIf Key = Keys.J Then
TextBox1.Text = TextBox1.Text & "J"
ElseIf Key = Keys.K Then
TextBox1.Text = TextBox1.Text & "K"
ElseIf Key = Keys.L Then
TextBox1.Text = TextBox1.Text & "L"
ElseIf Key = Keys.M Then
TextBox1.Text = TextBox1.Text & "M"
ElseIf Key = Keys.N Then
TextBox1.Text = TextBox1.Text & "N"
ElseIf Key = Keys.O Then
TextBox1.Text = TextBox1.Text & "O"
ElseIf Key = Keys.P Then
TextBox1.Text = TextBox1.Text & "P"
ElseIf Key = Keys.Q Then
TextBox1.Text = TextBox1.Text & "Q"
ElseIf Key = Keys.R Then
TextBox1.Text = TextBox1.Text & "R"
ElseIf Key = Keys.S Then
TextBox1.Text = TextBox1.Text & "S"
ElseIf Key = Keys.T Then
TextBox1.Text = TextBox1.Text & "T"
ElseIf Key = Keys.U Then
TextBox1.Text = TextBox1.Text & "U"
ElseIf Key = Keys.V Then
TextBox1.Text = TextBox1.Text & "V"
ElseIf Key = Keys.W Then
TextBox1.Text = TextBox1.Text & "W"
ElseIf Key = Keys.X Then
TextBox1.Text = TextBox1.Text & "X"
ElseIf Key = Keys.Y Then
TextBox1.Text = TextBox1.Text & "Y"
ElseIf Key = Keys.Z Then
TextBox1.Text = TextBox1.Text & "Z"
ElseIf Key = Keys.Space Then
TextBox1.Text = TextBox1.Text & " "
End If
End If
End If
If TextBox2.Text = "True" Then
If TextBox3.Text = "True" Then
If Key = Keys.A Then
TextBox1.Text = TextBox1.Text & "a"
ElseIf Key = Keys.B Then
TextBox1.Text = TextBox1.Text & "b"
ElseIf Key = Keys.C Then
TextBox1.Text = TextBox1.Text & "c"
ElseIf Key = Keys.D Then
TextBox1.Text = TextBox1.Text & "d"
ElseIf Key = Keys.E Then
TextBox1.Text = TextBox1.Text & "e"
ElseIf Key = Keys.F Then
TextBox1.Text = TextBox1.Text & "f"
ElseIf Key = Keys.G Then
TextBox1.Text = TextBox1.Text & "g"
ElseIf Key = Keys.H Then
TextBox1.Text = TextBox1.Text & "h"
ElseIf Key = Keys.I Then
TextBox1.Text = TextBox1.Text & "i"
ElseIf Key = Keys.J Then
TextBox1.Text = TextBox1.Text & "j"
ElseIf Key = Keys.K Then
TextBox1.Text = TextBox1.Text & "k"
ElseIf Key = Keys.L Then
TextBox1.Text = TextBox1.Text & "l"
ElseIf Key = Keys.M Then
TextBox1.Text = TextBox1.Text & "m"
ElseIf Key = Keys.N Then
TextBox1.Text = TextBox1.Text & "n"
ElseIf Key = Keys.O Then
TextBox1.Text = TextBox1.Text & "o"
ElseIf Key = Keys.P Then
TextBox1.Text = TextBox1.Text & "p"
ElseIf Key = Keys.Q Then
TextBox1.Text = TextBox1.Text & "q"
ElseIf Key = Keys.R Then
TextBox1.Text = TextBox1.Text & "r"
ElseIf Key = Keys.S Then
TextBox1.Text = TextBox1.Text & "s"
ElseIf Key = Keys.T Then
TextBox1.Text = TextBox1.Text & "t"
ElseIf Key = Keys.U Then
TextBox1.Text = TextBox1.Text & "u"
ElseIf Key = Keys.V Then
TextBox1.Text = TextBox1.Text & "v"
ElseIf Key = Keys.W Then
TextBox1.Text = TextBox1.Text & "w"
ElseIf Key = Keys.X Then
TextBox1.Text = TextBox1.Text & "x"
ElseIf Key = Keys.Y Then
TextBox1.Text = TextBox1.Text & "y"
ElseIf Key = Keys.Z Then
TextBox1.Text = TextBox1.Text & "z"
ElseIf Key = Keys.Space Then
TextBox1.Text = TextBox1.Text & " "
End If
End If
End If
If TextBox2.Text = "True" Then
If TextBox3.Text = "False" Then
If Key = Keys.A Then
TextBox1.Text = TextBox1.Text & "A"
ElseIf Key = Keys.B Then
TextBox1.Text = TextBox1.Text & "B"
ElseIf Key = Keys.C Then
TextBox1.Text = TextBox1.Text & "C"
ElseIf Key = Keys.D Then
TextBox1.Text = TextBox1.Text & "D"
ElseIf Key = Keys.E Then
TextBox1.Text = TextBox1.Text & "E"
ElseIf Key = Keys.F Then
TextBox1.Text = TextBox1.Text & "F"
ElseIf Key = Keys.G Then
TextBox1.Text = TextBox1.Text & "G"
ElseIf Key = Keys.H Then
TextBox1.Text = TextBox1.Text & "H"
ElseIf Key = Keys.I Then
TextBox1.Text = TextBox1.Text & "I"
ElseIf Key = Keys.J Then
TextBox1.Text = TextBox1.Text & "J"
ElseIf Key = Keys.K Then
TextBox1.Text = TextBox1.Text & "K"
ElseIf Key = Keys.L Then
TextBox1.Text = TextBox1.Text & "L"
ElseIf Key = Keys.M Then
TextBox1.Text = TextBox1.Text & "M"
ElseIf Key = Keys.N Then
TextBox1.Text = TextBox1.Text & "N"
ElseIf Key = Keys.O Then
TextBox1.Text = TextBox1.Text & "O"
ElseIf Key = Keys.P Then
TextBox1.Text = TextBox1.Text & "P"
ElseIf Key = Keys.Q Then
TextBox1.Text = TextBox1.Text & "Q"
ElseIf Key = Keys.R Then
TextBox1.Text = TextBox1.Text & "R"
ElseIf Key = Keys.S Then
TextBox1.Text = TextBox1.Text & "S"
ElseIf Key = Keys.T Then
TextBox1.Text = TextBox1.Text & "T"
ElseIf Key = Keys.U Then
TextBox1.Text = TextBox1.Text & "U"
ElseIf Key = Keys.V Then
TextBox1.Text = TextBox1.Text & "V"
ElseIf Key = Keys.W Then
TextBox1.Text = TextBox1.Text & "W"
ElseIf Key = Keys.X Then
TextBox1.Text = TextBox1.Text & "X"
ElseIf Key = Keys.Y Then
TextBox1.Text = TextBox1.Text & "Y"
ElseIf Key = Keys.Z Then
TextBox1.Text = TextBox1.Text & "Z"
ElseIf Key = Keys.Space Then
TextBox1.Text = TextBox1.Text & " "
End If
End If
End If
End Sub
Quote:Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
TextBox2.Text = Control.IsKeyLocked(Keys.CapsLock)
TextBox3.Text = ((Control.ModifierKeys And Keys.Shift) = Keys.Shift)
End Sub
03-16-2011, 11:23 AM
I have a question here.
i want to add hotkey on my program but i just cant make it work.
the hotkey is Control + S
It just wont work.
could someone help me??
Sorry for thread Digging
i want to add hotkey on my program but i just cant make it work.
the hotkey is Control + S
Code:
If Key = Keys.S And Key = Keys.Control Then
VolumeUp()
End If
could someone help me??
Sorry for thread Digging
03-24-2011, 07:50 AM
Don't forget those who are going to use this, you'll need to make it see when caps is on or off, etc so it will know what to do.
04-18-2011, 07:23 AM
Nice work i am sure some other will need this.
04-19-2011, 06:19 AM
Good job Vorfin.
I actually just implemented this into my program, which is a bot.
This made my method (Logging the users TYPED keys) much easier.
I actually just implemented this into my program, which is a bot.
This made my method (Logging the users TYPED keys) much easier.
04-21-2011, 07:13 AM
wow really great idea... i have never have this in my mind..
04-28-2011, 05:59 AM
Nice tutorial, Ill give this a try soon. Thanks mate.
04-28-2011, 06:10 AM
Thanks for this share. Will be using it.