Hi I am new to VB but I was trying to just make a program so that if you press the letter A on your keyboard the text in a textbox is added to 1 (it starts at 0).... I'm using vb 2008 express edition.
Public Class Form1
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.A Then
TextBox1.Text = TextBox1.Text + 1
End If
End Sub
End Class
I put a textbox (1) in my form but when i press run, the "cursor" is in the textbox so if i press A the thing changes to the letter a since my text cursor is in the box. Basically it doesnt work!!! HELP PLEASE!