VERSION 5.00
Begin VB.Form AGame5 
   BackColor       =   &H00000000&
   Caption         =   "Typing Tutorial"
   ClientHeight    =   6180
   ClientLeft      =   60
   ClientTop       =   1200
   ClientWidth     =   7530
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   13.5
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H0000FF00&
   Icon            =   "TypingTutorial.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   Picture         =   "TypingTutorial.frx":08CA
   ScaleHeight     =   8595
   ScaleWidth      =   11880
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin VB.PictureBox Picture4 
      Height          =   2250
      Left            =   3000
      Picture         =   "TypingTutorial.frx":4F794
      ScaleHeight     =   2190
      ScaleWidth      =   4140
      TabIndex        =   9
      Top             =   2880
      Visible         =   0   'False
      Width           =   4200
      Begin VB.CommandButton Command4 
         Height          =   495
         Left            =   1080
         Picture         =   "TypingTutorial.frx":52419
         Style           =   1  'Graphical
         TabIndex        =   10
         Top             =   1320
         Visible         =   0   'False
         Width           =   2000
      End
   End
   Begin VB.PictureBox Picture2 
      Height          =   2250
      Left            =   3000
      Picture         =   "TypingTutorial.frx":52C83
      ScaleHeight     =   2190
      ScaleWidth      =   4140
      TabIndex        =   7
      Top             =   2880
      Visible         =   0   'False
      Width           =   4200
      Begin VB.CommandButton Command2 
         Height          =   495
         Left            =   1080
         Picture         =   "TypingTutorial.frx":55553
         Style           =   1  'Graphical
         TabIndex        =   8
         Top             =   1200
         Visible         =   0   'False
         Width           =   2000
      End
   End
   Begin VB.PictureBox Picture1 
      Height          =   2250
      Left            =   3000
      Picture         =   "TypingTutorial.frx":55DBD
      ScaleHeight     =   2190
      ScaleWidth      =   4140
      TabIndex        =   5
      Top             =   2880
      Width           =   4200
      Begin VB.CommandButton Command1 
         Height          =   495
         Left            =   840
         Picture         =   "TypingTutorial.frx":58509
         Style           =   1  'Graphical
         TabIndex        =   6
         Top             =   1200
         Width           =   2535
      End
   End
   Begin VB.Timer Oras 
      Interval        =   1000
      Left            =   10320
      Top             =   2280
   End
   Begin VB.Timer T4 
      Enabled         =   0   'False
      Interval        =   800
      Left            =   1680
      Top             =   4920
   End
   Begin VB.Timer T3 
      Enabled         =   0   'False
      Interval        =   600
      Left            =   1200
      Top             =   4920
   End
   Begin VB.Timer T2 
      Enabled         =   0   'False
      Interval        =   400
      Left            =   720
      Top             =   4920
   End
   Begin VB.Timer T1 
      Enabled         =   0   'False
      Interval        =   200
      Left            =   240
      Top             =   4920
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      BackColor       =   &H00000000&
      BackStyle       =   0  'Transparent
      Caption         =   "1"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   495
      Left            =   10070
      TabIndex        =   4
      Top             =   6400
      Width           =   615
   End
   Begin VB.Label Label4 
      BackColor       =   &H80000002&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   375
      Left            =   10230
      TabIndex        =   3
      Top             =   4590
      Width           =   495
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "About"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   11.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   375
      Left            =   10080
      TabIndex        =   2
      Top             =   7680
      Width           =   735
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   255
      Left            =   10130
      TabIndex        =   1
      Top             =   3480
      Width           =   495
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackColor       =   &H00000000&
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   21.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   505
      Left            =   9840
      TabIndex        =   0
      Top             =   1400
      Width           =   1095
   End
End
Attribute VB_Name = "AGame5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a, b, c, d, ans, s1, s2, s3, s4, x(0 To 3) As Integer
Dim y, y1, y2, y22 As Integer
Dim y3, y33 As Integer
Dim y4, y44 As Integer
Dim ctr, str As Integer
Dim hits, mis, t_hits, t_mis As Integer
Dim rd As Integer
Dim sec1 As Integer

Private Sub Command1_Click()

  Label3.Visible = False
  Oras.Enabled = True
  T1.Enabled = True
  T2.Enabled = True
  T3.Enabled = True
  T4.Enabled = True
  
  Oras.Interval = 1000
  T1.Interval = 200
  T2.Interval = 400
  T3.Interval = 600
  T4.Interval = 800
  
  Command1.Visible = False
  Picture1.Visible = False
End Sub

Private Sub Command2_Click()
  End
End Sub


Private Sub Command4_Click()

 Picture4.Visible = False
 Command4.Visible = False
 
 rd = rd + 1
 Label2.Caption = " "
 Label4.Caption = " "
 Label5.Caption = rd
 

 sec1 = 20       '<-----------You could change the seconds
 
 T1.Enabled = True
 T2.Enabled = True
 T3.Enabled = True
 T4.Enabled = True
 Oras.Enabled = True
 
End Sub

'a to z is 97 to 122
'A to Z is 65 to 90

Private Sub Form_KeyPress(KeyAscii As Integer)
  ans = Chr(KeyAscii)
  
    If ans = Chr(a) Then
      Call Erase1
    ElseIf ans = Chr(b) Then
      Call Erase2
    ElseIf ans = Chr(c) Then
      Call Erase3
    ElseIf ans = Chr(d) Then
      Call Erase4
    Else
      mis = mis + 1
      Label4.Caption = mis
      '  If mis = 6 Then
      '    T1.Enabled = False
      '    T2.Enabled = False
      '    T3.Enabled = False
      '    T4.Enabled = False
      '    Oras.Enabled = False
          
      '    Picture3.Visible = True
      '    Command3.Visible = True
                    
      '    Exit Sub
      '  End If
        
    End If
    
End Sub

Private Sub Form_Load()
mis = 0
hits = 0
ctr = 0

 Oras.Interval = 0
 T1.Interval = 0
 T2.Interval = 0
 T3.Interval = 0
 T4.Interval = 0

sec1 = 20

rd = 1
Label5.Caption = rd

Do
  Randomize
  x(ctr) = Int((8000 - 500 + 1) * Rnd + 500)
  ctr = ctr + 1
Loop Until ctr = 4

y = 500
y33 = 500
y1 = 500
y2 = 500
y22 = 500
y3 = 500
y33 = 500
y4 = 500
y44 = 500

 '-----------------------LETTERS-----------------------
  a = Int((122 - 97 + 1) * Rnd + 97)
  b = Int((122 - 97 + 1) * Rnd + 97)
  c = Int((122 - 97 + 1) * Rnd + 97)
  d = Int((122 - 97 + 1) * Rnd + 97)
  
  '------------------------secONDS---------------------
  s1 = Int((150 - 90 + 1) * Rnd + 90)
  s2 = Int((150 - 90 + 1) * Rnd + 90)
  s3 = Int((150 - 90 + 1) * Rnd + 90)
  s4 = Int((150 - 90 + 1) * Rnd + 90)
  
    
End Sub

Private Sub Label3_Click()
  About.Show
End Sub

Private Sub Oras_Timer()
  Label1.Caption = sec1
    If sec1 = 0 Then
       t_mis = t_mis + mis
       t_hits = t_hits + hits
       mis = 0
       hits = 0

      If rd = 4 Then
        
        T1.Enabled = False
        T2.Enabled = False
        T3.Enabled = False
        T4.Enabled = False
        Oras.Enabled = False
        
        Picture2.Visible = True
        Command2.Visible = True
        
        Label2.Caption = t_hits
        Label4.Caption = t_mis
        
        Exit Sub
      End If
      
     Picture4.Visible = True
     Command4.Visible = True
          
     T1.Enabled = False
     T2.Enabled = False
     T3.Enabled = False
     T4.Enabled = False
     Oras.Enabled = False
          
     Exit Sub
     ' End
    End If
  sec1 = sec1 - 1
End Sub



Private Sub T1_Timer()
  
  T1.Interval = s1
    
  Me.ForeColor = vbBlack    '//////ERASER//////
  Me.CurrentX = x(0)
  Me.CurrentY = y1
  Me.Print Chr(a)
  
  Me.ForeColor = vbGreen
  Me.CurrentX = x(0)
  Me.CurrentY = y
  Me.Print Chr(a)
        
    If y >= 7900 Then
      hits = hits + 1
      Label2.Caption = hits
      Me.ForeColor = vbBlack
      Me.CurrentX = x(0)
      Me.CurrentY = y
      Me.Print Chr(a)
      y = 500
    '    If hits = 6 Then
    '      If pako = 7 Then Exit Sub
    '      T1.Enabled = False
    '      T2.Enabled = False
    '      T3.Enabled = False
    '      T4.Enabled = False
    '      Oras.Enabled = False
    
    '      Picture3.Visible = True
    '      Command3.Visible = True
   
    '     Exit Sub
          
    '    End If
    End If
  
  y = y + 200
  y1 = y - 200
    
    
End Sub

Private Sub T2_Timer()

 T2.Interval = s2
  
  Me.ForeColor = vbBlack    '//////ERASER//////
  Me.CurrentX = x(1)
  Me.CurrentY = y22
  Me.Print Chr(b)
  
  Me.ForeColor = vbGreen
  Me.CurrentX = x(1)
  Me.CurrentY = y2
  Me.Print Chr(b)
    
    If y2 >= 7900 Then
       hits = hits + 1
       Label2.Caption = hits
       Me.ForeColor = vbBlack
       Me.CurrentX = x(1)
       Me.CurrentY = y2
       Me.Print Chr(b)
       y2 = 500
     '  If hits = 6 Then
     
     '     T1.Enabled = False
     '     T2.Enabled = False
     '     T3.Enabled = False
     '     T4.Enabled = False
     '     Oras.Enabled = False
          
     '     Picture3.Visible = True
     '     Command3.Visible = True
          
     '     Exit Sub
     '   End If
    End If
  
  y2 = y2 + 200
  y22 = y2 - 200
    
End Sub

Public Sub Erase1()
  Me.ForeColor = vbBlack    '//////ERASER//////
  Me.CurrentX = x(0)
  Me.CurrentY = y1
  Me.Print Chr(a)
  
  s1 = Int((150 - 90 + 1) * Rnd + 90)
    
      If rd = 2 Then
        s1 = Int((130 - 60 + 1) * Rnd + 60)
      ElseIf rd = 3 Then
        s1 = Int((120 - 50 + 1) * Rnd + 50)
      ElseIf rd = 4 Then
        s1 = Int((110 - 30 + 1) * Rnd + 30)
      End If
      
  a = Int((122 - 97 + 1) * Rnd + 97)
  y = 500
  y1 = 500
  
  ctr = 0
  
  Call Columns
End Sub

Public Sub Erase2()
  Me.ForeColor = vbBlack    '//////ERASER//////
  Me.CurrentX = x(1)
  Me.CurrentY = y22
  Me.Print Chr(b)
  
  s2 = Int((150 - 90 + 1) * Rnd + 90)
  
      If rd = 2 Then
        s2 = Int((130 - 60 + 1) * Rnd + 60)
      ElseIf rd = 3 Then
        s2 = Int((120 - 50 + 1) * Rnd + 50)
      ElseIf rd = 4 Then
        s2 = Int((110 - 30 + 1) * Rnd + 30)
      End If
      
  b = Int((122 - 97 + 1) * Rnd + 97)
  y2 = 500
  y22 = 500
  
  ctr = 1
    
  Call Columns
End Sub

Public Sub Columns()
  Randomize
  x(ctr) = Int((8000 - 500 + 1) * Rnd + 500)
End Sub

Private Sub T3_Timer()
 T3.Interval = s3
  
  Me.ForeColor = vbBlack    '//////ERASER//////
  Me.CurrentX = x(2)
  Me.CurrentY = y33
  Me.Print Chr(c)
  
  Me.ForeColor = vbGreen
  Me.CurrentX = x(2)
  Me.CurrentY = y3
  Me.Print Chr(c)
    
    If y3 >= 7900 Then
       hits = hits + 1
       Label2.Caption = hits
       Me.ForeColor = vbBlack
       Me.CurrentX = x(2)
       Me.CurrentY = y3
       Me.Print Chr(c)
       y3 = 500
      ' If hits = 6 Then
      '    If pako = 7 Then Exit Sub
        
      '    T1.Enabled = False
      '    T2.Enabled = False
      '    T3.Enabled = False
      '    T4.Enabled = False
      '    Oras.Enabled = False
          
      '    Picture3.Visible = True
      '    Command3.Visible = True
          
      '    Exit Sub
      '  End If
    End If
  y3 = y3 + 200
  y33 = y3 - 200
  
End Sub

Public Sub Erase3()
  Me.ForeColor = vbBlack    '//////ERASER//////
  Me.CurrentX = x(2)
  Me.CurrentY = y33
  Me.Print Chr(c)
  
  s3 = Int((150 - 90 + 1) * Rnd + 90)
  
      If rd = 2 Then
        s3 = Int((130 - 60 + 1) * Rnd + 60)
      ElseIf rd = 3 Then
        s3 = Int((120 - 50 + 1) * Rnd + 50)
      ElseIf rd = 4 Then
        s3 = Int((110 - 30 + 1) * Rnd + 30)
      End If
      
  c = Int((122 - 97 + 1) * Rnd + 97)
  y3 = 500
  y33 = 500
  
  ctr = 2

  Call Columns
End Sub

Private Sub T4_Timer()
T4.Interval = s4
  
  Me.ForeColor = vbBlack    '//////ERASER//////
  Me.CurrentX = x(3)
  Me.CurrentY = y44
  Me.Print Chr(d)
  
  Me.ForeColor = vbGreen
  Me.CurrentX = x(3)
  Me.CurrentY = y4
  Me.Print Chr(d)
    
    If y4 >= 7900 Then
      hits = hits + 1
      Label2.Caption = hits
      Me.ForeColor = vbBlack
      Me.CurrentX = x(3)
      Me.CurrentY = y4
      Me.Print Chr(d)
      y4 = 500
    '  If hits = 6 Then
    
    '      T1.Enabled = False
    '      T2.Enabled = False
    '      T3.Enabled = False
    '      T4.Enabled = False
    '      Oras.Enabled = False
          
    '     Picture3.Visible = True
    '     Command3.Visible = True
          
    '     Exit Sub
    '  End If
    End If
  y4 = y4 + 200
  y44 = y4 - 200
    
End Sub

Public Sub Erase4()
  Me.ForeColor = vbBlack    '//////ERASER//////
  Me.CurrentX = x(3)
  Me.CurrentY = y44
  Me.Print Chr(d)
  
  s4 = Int((150 - 90 + 1) * Rnd + 90)
    
    If rd = 2 Then
        s4 = Int((130 - 60 + 1) * Rnd + 60)
      ElseIf rd = 3 Then
        s4 = Int((120 - 50 + 1) * Rnd + 50)
      ElseIf rd = 4 Then
        s4 = Int((110 - 30 + 1) * Rnd + 30)
      End If
      
  d = Int((90 - 65 + 1) * Rnd + 65)
  y4 = 500
  y44 = 500
  
  ctr = 3

  Call Columns
End Sub

