[Source]Keyboard recorded, watcher
hi i saw sum1 asking how to do that... there u go resource and project:
[php]Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Int32) As Int16
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
''Options down here:
If GetAsyncKeyState(Keys.F5) Then
TextBox1.Text = ""
End If
If GetAsyncKeyState(Keys.F8) Then
Timer1****terval = TextBox2.Text
End If
If GetAsyncKeyState(Keys.F7) Then
Me.WindowState = FormWindowState.Minimized
End If
If GetAsyncKeyState(Keys.F6) Then
Me.TopMost = True
End If
If GetAsyncKeyState(Keys.F9) Then
MsgBox("Made by m_t_h")
End If
'''''''''''''''
'other sheet down here:
If GetAsyncKeyState(Keys.A) Then
TextBox1.Text &= "a"
End If
If GetAsyncKeyState(Keys.B) Then
TextBox1.Text &= "b"
End If
If GetAsyncKeyState(Keys.C) Then
TextBox1.Text &= "c"
End If
If GetAsyncKeyState(Keys.D) Then
TextBox1.Text &= "d"
End If
If GetAsyncKeyState(Keys.E) Then
TextBox1.Text &= "e"
End If
If GetAsyncKeyState(Keys.F) Then
TextBox1.Text &= "f"
End If
If GetAsyncKeyState(Keys.G) Then
TextBox1.Text &= "g"
End If
If GetAsyncKeyState(Keys.H) Then
TextBox1.Text &= "h"
End If
If GetAsyncKeyState(Keys.I) Then
TextBox1.Text &= "i"
End If
If GetAsyncKeyState(Keys.J) Then
TextBox1.Text &= "j"
End If
If GetAsyncKeyState(Keys.K) Then
TextBox1.Text &= "k"
End If
If GetAsyncKeyState(Keys.L) Then
TextBox1.Text &= "l"
End If
If GetAsyncKeyState(Keys.M) Then
TextBox1.Text &= "m"
End If
If GetAsyncKeyState(Keys.N) Then
TextBox1.Text &= "n"
End If
If GetAsyncKeyState(Keys.O) Then
TextBox1.Text &= "o"
End If
If GetAsyncKeyState(Keys.P) Then
TextBox1.Text &= "p"
End If
If GetAsyncKeyState(Keys.Q) Then
TextBox1.Text &= "q"
End If
If GetAsyncKeyState(Keys.R) Then
TextBox1.Text &= "r"
End If
If GetAsyncKeyState(Keys.S) Then
TextBox1.Text &= "s"
End If
If GetAsyncKeyState(Keys.T) Then
TextBox1.Text &= "t"
End If
If GetAsyncKeyState(Keys.U) Then
TextBox1.Text &= "u"
End If
If GetAsyncKeyState(Keys.V) Then
TextBox1.Text &= "v"
End If
If GetAsyncKeyState(Keys.W) Then
TextBox1.Text &= "w"
End If
If GetAsyncKeyState(Keys.X) Then
TextBox1.Text &= "x"
End If
If GetAsyncKeyState(Keys.Y) Then
TextBox1.Text &= "y"
End If
If GetAsyncKeyState(Keys.Z) Then
TextBox1.Text &= "z"
End If
If GetAsyncKeyState(Keys.Space) Then
TextBox1.Text &= " "
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
End Sub
End Class
[/php]
yea thanks to blubb aggain ^^. you can use better ways but yea..
VirusTotal - Brezpla?en spletni pregledovalnik virusov in ostalih zlonamernih programov - Rezultati
edit: i saw some stars in text.. there's timer1(.)interval (remove ())
[php]
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Dim ff As New KeysConverter
MsgBox(ff.ConvertToString(e.KeyCode))
End Sub
[/php]
...? This is much easier, no?
Nice, i can't wait to convert it to c#.
I must say that you have a lot of repetitive code.. :\
Why didn't you make a function out of it?
Extremely unclean code.
Lol somehow I did it, I can't believe I spent ages trying to think up some code to figure this out before. Knowing about KeysConverter makes it a whole lot easier.
Here's a snippet.
[php]
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
For i As Integer = 1 To 255
Dim theKey As Boolean = GetAsyncKeyState(i)
If theKey Then
Dim kCon As New KeysConverter
Dim KeyToString As String = kCon.ConvertToString(i)
If KeyToString.ToLower = Label1.Text.ToLower Then
MsgBox("The letter was pressed, fuck J-deezy is awesome")
End If
End If
Next
End Sub
[/php]
Woot?