Option Explicit
Dim score As Integer
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim q As Integer
For q = 0 To Label1.Count - 1
If Label1.Item(q).Caption = Chr(KeyAscii) Then
score = score + 1
Label1.Item(q).Visible = False
Label1.Item(q).Caption = 0
End If
Label2.Caption = score
Next
End Sub
Private Sub Form_Load()
Dim i As Integer
Dim j As Integer
For i = 0 To Label1.Count - 1
Label1.Item(i).Top = 0 - 600 * i
Label1.Item(i).FontSize = 20
Randomize
j = Int(26 * Rnd + 97)
Label1.Item(i).Caption = Chr(j)
Next
End Sub
Private Sub Timer1_Timer()
Dim k As Integer
For k = 0 To Label1.Count - 1
If Label1.Item(k).Top > 5000 Then
Label1.Item(k).Top = 0
End If
Label1.Item(k).Top = Label1.Item(k).Top + 100
Next
End Sub