title: Basic Key Logger - Code Not Working
body: <pre><code>Public Class Form1
  Dim KeyState
  
  Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Boolean
  
  Private Sub LogTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogTimer.Tick
      For I = 1 To 255
          KeyState = 0
  
          KeyState = GetAsyncKeyState(I)
          If KeyState = True Then
              Me.txtLog.Text = Me.txtLog.Text &amp; Chr(I)
          End If
  
      Next I
  End Sub
  End Class
  </code></pre>
  
  <hr>
  
  <p>Just a run down:
  I am attempting to get the up/down state of every key every tenth of a second(the timer), then add any keys pressed to a textbox.</p>
  
  <p>I honestly cannot see why this code is not working.</p>