typeForm.frm
上传用户:tashmp
上传日期:2010-04-03
资源大小:882k
文件大小:53k
源码类别:

其他游戏

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form typeForm 
  3.    AutoRedraw      =   -1  'True
  4.    Caption         =   "键上飞打字练习"
  5.    ClientHeight    =   5865
  6.    ClientLeft      =   165
  7.    ClientTop       =   735
  8.    ClientWidth     =   9990
  9.    Icon            =   "typeForm.frx":0000
  10.    KeyPreview      =   -1  'True
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   5865
  14.    ScaleWidth      =   9990
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.CommandButton Command4 
  17.       Caption         =   "主界面"
  18.       Height          =   495
  19.       Left            =   6480
  20.       Style           =   1  'Graphical
  21.       TabIndex        =   62
  22.       Top             =   4920
  23.       Width           =   1455
  24.    End
  25.    Begin VB.Timer Timer2 
  26.       Enabled         =   0   'False
  27.       Interval        =   1
  28.       Left            =   720
  29.       Top             =   5040
  30.    End
  31.    Begin VB.CommandButton Command3 
  32.       Caption         =   "退出"
  33.       Height          =   495
  34.       Left            =   8040
  35.       Style           =   1  'Graphical
  36.       TabIndex        =   59
  37.       Top             =   4920
  38.       Width           =   1455
  39.    End
  40.    Begin VB.CommandButton Command2 
  41.       Caption         =   "测试开始"
  42.       Height          =   495
  43.       Left            =   4920
  44.       Style           =   1  'Graphical
  45.       TabIndex        =   56
  46.       Top             =   4920
  47.       Width           =   1455
  48.    End
  49.    Begin VB.Timer Timer1 
  50.       Interval        =   1000
  51.       Left            =   240
  52.       Top             =   5040
  53.    End
  54.    Begin VB.Frame Frame2 
  55.       Caption         =   "打字练习统计"
  56.       Enabled         =   0   'False
  57.       Height          =   735
  58.       Left            =   240
  59.       TabIndex        =   1
  60.       Top             =   120
  61.       Width           =   5895
  62.       Begin VB.Label Label9 
  63.          BackStyle       =   0  'Transparent
  64.          BeginProperty Font 
  65.             Name            =   "MS Sans Serif"
  66.             Size            =   12
  67.             Charset         =   0
  68.             Weight          =   700
  69.             Underline       =   0   'False
  70.             Italic          =   0   'False
  71.             Strikethrough   =   0   'False
  72.          EndProperty
  73.          Height          =   255
  74.          Left            =   5160
  75.          TabIndex        =   10
  76.          Top             =   240
  77.          Width           =   615
  78.       End
  79.       Begin VB.Label Label8 
  80.          BackStyle       =   0  'Transparent
  81.          Caption         =   "正确率"
  82.          BeginProperty Font 
  83.             Name            =   "MS Sans Serif"
  84.             Size            =   12
  85.             Charset         =   0
  86.             Weight          =   700
  87.             Underline       =   0   'False
  88.             Italic          =   0   'False
  89.             Strikethrough   =   0   'False
  90.          EndProperty
  91.          Height          =   255
  92.          Left            =   4080
  93.          TabIndex        =   9
  94.          Top             =   240
  95.          Width           =   855
  96.       End
  97.       Begin VB.Label Label7 
  98.          BackStyle       =   0  'Transparent
  99.          BeginProperty Font 
  100.             Name            =   "MS Sans Serif"
  101.             Size            =   12
  102.             Charset         =   0
  103.             Weight          =   700
  104.             Underline       =   0   'False
  105.             Italic          =   0   'False
  106.             Strikethrough   =   0   'False
  107.          EndProperty
  108.          Height          =   255
  109.          Left            =   3360
  110.          TabIndex        =   8
  111.          Top             =   240
  112.          Width           =   735
  113.       End
  114.       Begin VB.Label Label6 
  115.          BackStyle       =   0  'Transparent
  116.          Caption         =   "正确字符数"
  117.          BeginProperty Font 
  118.             Name            =   "MS Sans Serif"
  119.             Size            =   12
  120.             Charset         =   0
  121.             Weight          =   700
  122.             Underline       =   0   'False
  123.             Italic          =   0   'False
  124.             Strikethrough   =   0   'False
  125.          EndProperty
  126.          Height          =   255
  127.          Left            =   2160
  128.          TabIndex        =   7
  129.          Top             =   240
  130.          Width           =   975
  131.       End
  132.       Begin VB.Label Label5 
  133.          BackStyle       =   0  'Transparent
  134.          BeginProperty Font 
  135.             Name            =   "MS Sans Serif"
  136.             Size            =   12
  137.             Charset         =   0
  138.             Weight          =   700
  139.             Underline       =   0   'False
  140.             Italic          =   0   'False
  141.             Strikethrough   =   0   'False
  142.          EndProperty
  143.          Height          =   375
  144.          Left            =   1320
  145.          TabIndex        =   6
  146.          Top             =   240
  147.          Width           =   735
  148.       End
  149.       Begin VB.Label Label4 
  150.          BackStyle       =   0  'Transparent
  151.          Caption         =   "字符总数"
  152.          BeginProperty Font 
  153.             Name            =   "MS Sans Serif"
  154.             Size            =   12
  155.             Charset         =   0
  156.             Weight          =   700
  157.             Underline       =   0   'False
  158.             Italic          =   0   'False
  159.             Strikethrough   =   0   'False
  160.          EndProperty
  161.          Height          =   255
  162.          Left            =   240
  163.          TabIndex        =   5
  164.          Top             =   240
  165.          Width           =   735
  166.       End
  167.    End
  168.    Begin VB.Frame Frame1 
  169.       Caption         =   "键上飞打字练习"
  170.       Enabled         =   0   'False
  171.       Height          =   3375
  172.       Left            =   120
  173.       TabIndex        =   0
  174.       Top             =   1440
  175.       Width           =   9255
  176.       Begin VB.CommandButton Command1 
  177.          BackColor       =   &H00C0C0FF&
  178.          Caption         =   "/"
  179.          BeginProperty Font 
  180.             Name            =   "MS Sans Serif"
  181.             Size            =   13.5
  182.             Charset         =   0
  183.             Weight          =   700
  184.             Underline       =   0   'False
  185.             Italic          =   0   'False
  186.             Strikethrough   =   0   'False
  187.          EndProperty
  188.          Height          =   495
  189.          Index           =   45
  190.          Left            =   7200
  191.          Style           =   1  'Graphical
  192.          TabIndex        =   55
  193.          Top             =   1800
  194.          Width           =   615
  195.       End
  196.       Begin VB.CommandButton Command1 
  197.          BackColor       =   &H00C0C0FF&
  198.          Caption         =   "."
  199.          BeginProperty Font 
  200.             Name            =   "MS Sans Serif"
  201.             Size            =   13.5
  202.             Charset         =   0
  203.             Weight          =   700
  204.             Underline       =   0   'False
  205.             Italic          =   0   'False
  206.             Strikethrough   =   0   'False
  207.          EndProperty
  208.          Height          =   495
  209.          Index           =   44
  210.          Left            =   6600
  211.          Style           =   1  'Graphical
  212.          TabIndex        =   54
  213.          Top             =   1800
  214.          Width           =   615
  215.       End
  216.       Begin VB.CommandButton Command1 
  217.          BackColor       =   &H00C0C0FF&
  218.          Caption         =   ","
  219.          BeginProperty Font 
  220.             Name            =   "MS Sans Serif"
  221.             Size            =   13.5
  222.             Charset         =   0
  223.             Weight          =   700
  224.             Underline       =   0   'False
  225.             Italic          =   0   'False
  226.             Strikethrough   =   0   'False
  227.          EndProperty
  228.          Height          =   495
  229.          Index           =   43
  230.          Left            =   6000
  231.          Style           =   1  'Graphical
  232.          TabIndex        =   53
  233.          Top             =   1800
  234.          Width           =   615
  235.       End
  236.       Begin VB.CommandButton Command1 
  237.          BackColor       =   &H00C0C0FF&
  238.          Caption         =   "M"
  239.          BeginProperty Font 
  240.             Name            =   "MS Sans Serif"
  241.             Size            =   13.5
  242.             Charset         =   0
  243.             Weight          =   700
  244.             Underline       =   0   'False
  245.             Italic          =   0   'False
  246.             Strikethrough   =   0   'False
  247.          EndProperty
  248.          Height          =   495
  249.          Index           =   42
  250.          Left            =   5400
  251.          Style           =   1  'Graphical
  252.          TabIndex        =   52
  253.          Top             =   1800
  254.          Width           =   615
  255.       End
  256.       Begin VB.CommandButton Command1 
  257.          BackColor       =   &H00C0C0FF&
  258.          Caption         =   "N"
  259.          BeginProperty Font 
  260.             Name            =   "MS Sans Serif"
  261.             Size            =   13.5
  262.             Charset         =   0
  263.             Weight          =   700
  264.             Underline       =   0   'False
  265.             Italic          =   0   'False
  266.             Strikethrough   =   0   'False
  267.          EndProperty
  268.          Height          =   495
  269.          Index           =   41
  270.          Left            =   4800
  271.          Style           =   1  'Graphical
  272.          TabIndex        =   51
  273.          Top             =   1800
  274.          Width           =   615
  275.       End
  276.       Begin VB.CommandButton Command1 
  277.          BackColor       =   &H00C0C0FF&
  278.          Caption         =   "B"
  279.          BeginProperty Font 
  280.             Name            =   "MS Sans Serif"
  281.             Size            =   13.5
  282.             Charset         =   0
  283.             Weight          =   700
  284.             Underline       =   0   'False
  285.             Italic          =   0   'False
  286.             Strikethrough   =   0   'False
  287.          EndProperty
  288.          Height          =   495
  289.          Index           =   40
  290.          Left            =   4200
  291.          Style           =   1  'Graphical
  292.          TabIndex        =   50
  293.          Top             =   1800
  294.          Width           =   615
  295.       End
  296.       Begin VB.CommandButton Command1 
  297.          BackColor       =   &H00C0C0FF&
  298.          Caption         =   "V"
  299.          BeginProperty Font 
  300.             Name            =   "MS Sans Serif"
  301.             Size            =   13.5
  302.             Charset         =   0
  303.             Weight          =   700
  304.             Underline       =   0   'False
  305.             Italic          =   0   'False
  306.             Strikethrough   =   0   'False
  307.          EndProperty
  308.          Height          =   495
  309.          Index           =   39
  310.          Left            =   3600
  311.          Style           =   1  'Graphical
  312.          TabIndex        =   49
  313.          Top             =   1800
  314.          Width           =   615
  315.       End
  316.       Begin VB.CommandButton Command1 
  317.          BackColor       =   &H00C0C0FF&
  318.          Caption         =   "C"
  319.          BeginProperty Font 
  320.             Name            =   "MS Sans Serif"
  321.             Size            =   13.5
  322.             Charset         =   0
  323.             Weight          =   700
  324.             Underline       =   0   'False
  325.             Italic          =   0   'False
  326.             Strikethrough   =   0   'False
  327.          EndProperty
  328.          Height          =   495
  329.          Index           =   38
  330.          Left            =   3000
  331.          Style           =   1  'Graphical
  332.          TabIndex        =   48
  333.          Top             =   1800
  334.          Width           =   615
  335.       End
  336.       Begin VB.CommandButton Command1 
  337.          BackColor       =   &H00C0C0FF&
  338.          Caption         =   "X"
  339.          BeginProperty Font 
  340.             Name            =   "MS Sans Serif"
  341.             Size            =   13.5
  342.             Charset         =   0
  343.             Weight          =   700
  344.             Underline       =   0   'False
  345.             Italic          =   0   'False
  346.             Strikethrough   =   0   'False
  347.          EndProperty
  348.          Height          =   495
  349.          Index           =   37
  350.          Left            =   2400
  351.          Style           =   1  'Graphical
  352.          TabIndex        =   47
  353.          Top             =   1800
  354.          Width           =   615
  355.       End
  356.       Begin VB.CommandButton Command1 
  357.          BackColor       =   &H00C0C0FF&
  358.          Caption         =   "Z"
  359.          BeginProperty Font 
  360.             Name            =   "MS Sans Serif"
  361.             Size            =   13.5
  362.             Charset         =   0
  363.             Weight          =   700
  364.             Underline       =   0   'False
  365.             Italic          =   0   'False
  366.             Strikethrough   =   0   'False
  367.          EndProperty
  368.          Height          =   495
  369.          Index           =   36
  370.          Left            =   1800
  371.          Style           =   1  'Graphical
  372.          TabIndex        =   46
  373.          Top             =   1800
  374.          Width           =   615
  375.       End
  376.       Begin VB.CommandButton Command1 
  377.          BackColor       =   &H00C0C0FF&
  378.          Caption         =   "'"
  379.          BeginProperty Font 
  380.             Name            =   "MS Sans Serif"
  381.             Size            =   13.5
  382.             Charset         =   0
  383.             Weight          =   700
  384.             Underline       =   0   'False
  385.             Italic          =   0   'False
  386.             Strikethrough   =   0   'False
  387.          EndProperty
  388.          Height          =   495
  389.          Index           =   35
  390.          Left            =   7560
  391.          Style           =   1  'Graphical
  392.          TabIndex        =   45
  393.          Top             =   1320
  394.          Width           =   615
  395.       End
  396.       Begin VB.CommandButton Command1 
  397.          BackColor       =   &H00C0C0FF&
  398.          Caption         =   ";"
  399.          BeginProperty Font 
  400.             Name            =   "MS Sans Serif"
  401.             Size            =   13.5
  402.             Charset         =   0
  403.             Weight          =   700
  404.             Underline       =   0   'False
  405.             Italic          =   0   'False
  406.             Strikethrough   =   0   'False
  407.          EndProperty
  408.          Height          =   495
  409.          Index           =   34
  410.          Left            =   6960
  411.          Style           =   1  'Graphical
  412.          TabIndex        =   44
  413.          Top             =   1320
  414.          Width           =   615
  415.       End
  416.       Begin VB.CommandButton Command1 
  417.          BackColor       =   &H00C0C0FF&
  418.          Caption         =   "L"
  419.          BeginProperty Font 
  420.             Name            =   "MS Sans Serif"
  421.             Size            =   13.5
  422.             Charset         =   0
  423.             Weight          =   700
  424.             Underline       =   0   'False
  425.             Italic          =   0   'False
  426.             Strikethrough   =   0   'False
  427.          EndProperty
  428.          Height          =   495
  429.          Index           =   33
  430.          Left            =   6360
  431.          Style           =   1  'Graphical
  432.          TabIndex        =   43
  433.          Top             =   1320
  434.          Width           =   615
  435.       End
  436.       Begin VB.CommandButton Command1 
  437.          BackColor       =   &H00C0C0FF&
  438.          Caption         =   "K"
  439.          BeginProperty Font 
  440.             Name            =   "MS Sans Serif"
  441.             Size            =   13.5
  442.             Charset         =   0
  443.             Weight          =   700
  444.             Underline       =   0   'False
  445.             Italic          =   0   'False
  446.             Strikethrough   =   0   'False
  447.          EndProperty
  448.          Height          =   495
  449.          Index           =   32
  450.          Left            =   5760
  451.          Style           =   1  'Graphical
  452.          TabIndex        =   42
  453.          Top             =   1320
  454.          Width           =   615
  455.       End
  456.       Begin VB.CommandButton Command1 
  457.          BackColor       =   &H00C0C0FF&
  458.          Caption         =   "J"
  459.          BeginProperty Font 
  460.             Name            =   "MS Sans Serif"
  461.             Size            =   13.5
  462.             Charset         =   0
  463.             Weight          =   700
  464.             Underline       =   0   'False
  465.             Italic          =   0   'False
  466.             Strikethrough   =   0   'False
  467.          EndProperty
  468.          Height          =   495
  469.          Index           =   31
  470.          Left            =   5160
  471.          Style           =   1  'Graphical
  472.          TabIndex        =   41
  473.          Top             =   1320
  474.          Width           =   615
  475.       End
  476.       Begin VB.CommandButton Command1 
  477.          BackColor       =   &H00C0C0FF&
  478.          Caption         =   "H"
  479.          BeginProperty Font 
  480.             Name            =   "MS Sans Serif"
  481.             Size            =   13.5
  482.             Charset         =   0
  483.             Weight          =   700
  484.             Underline       =   0   'False
  485.             Italic          =   0   'False
  486.             Strikethrough   =   0   'False
  487.          EndProperty
  488.          Height          =   495
  489.          Index           =   30
  490.          Left            =   4560
  491.          Style           =   1  'Graphical
  492.          TabIndex        =   40
  493.          Top             =   1320
  494.          Width           =   615
  495.       End
  496.       Begin VB.CommandButton Command1 
  497.          BackColor       =   &H00C0C0FF&
  498.          Caption         =   "G"
  499.          BeginProperty Font 
  500.             Name            =   "MS Sans Serif"
  501.             Size            =   13.5
  502.             Charset         =   0
  503.             Weight          =   700
  504.             Underline       =   0   'False
  505.             Italic          =   0   'False
  506.             Strikethrough   =   0   'False
  507.          EndProperty
  508.          Height          =   495
  509.          Index           =   29
  510.          Left            =   3960
  511.          Style           =   1  'Graphical
  512.          TabIndex        =   39
  513.          Top             =   1320
  514.          Width           =   615
  515.       End
  516.       Begin VB.CommandButton Command1 
  517.          BackColor       =   &H00C0C0FF&
  518.          Caption         =   "F"
  519.          BeginProperty Font 
  520.             Name            =   "MS Sans Serif"
  521.             Size            =   13.5
  522.             Charset         =   0
  523.             Weight          =   700
  524.             Underline       =   0   'False
  525.             Italic          =   0   'False
  526.             Strikethrough   =   0   'False
  527.          EndProperty
  528.          Height          =   495
  529.          Index           =   28
  530.          Left            =   3360
  531.          Style           =   1  'Graphical
  532.          TabIndex        =   38
  533.          Top             =   1320
  534.          Width           =   615
  535.       End
  536.       Begin VB.CommandButton Command1 
  537.          BackColor       =   &H00C0C0FF&
  538.          Caption         =   "D"
  539.          BeginProperty Font 
  540.             Name            =   "MS Sans Serif"
  541.             Size            =   13.5
  542.             Charset         =   0
  543.             Weight          =   700
  544.             Underline       =   0   'False
  545.             Italic          =   0   'False
  546.             Strikethrough   =   0   'False
  547.          EndProperty
  548.          Height          =   495
  549.          Index           =   27
  550.          Left            =   2760
  551.          Style           =   1  'Graphical
  552.          TabIndex        =   37
  553.          Top             =   1320
  554.          Width           =   615
  555.       End
  556.       Begin VB.CommandButton Command1 
  557.          BackColor       =   &H00C0C0FF&
  558.          Caption         =   "S"
  559.          BeginProperty Font 
  560.             Name            =   "MS Sans Serif"
  561.             Size            =   13.5
  562.             Charset         =   0
  563.             Weight          =   700
  564.             Underline       =   0   'False
  565.             Italic          =   0   'False
  566.             Strikethrough   =   0   'False
  567.          EndProperty
  568.          Height          =   495
  569.          Index           =   26
  570.          Left            =   2160
  571.          Style           =   1  'Graphical
  572.          TabIndex        =   36
  573.          Top             =   1320
  574.          Width           =   615
  575.       End
  576.       Begin VB.CommandButton Command1 
  577.          BackColor       =   &H00C0C0FF&
  578.          Caption         =   "A"
  579.          BeginProperty Font 
  580.             Name            =   "MS Sans Serif"
  581.             Size            =   13.5
  582.             Charset         =   0
  583.             Weight          =   700
  584.             Underline       =   0   'False
  585.             Italic          =   0   'False
  586.             Strikethrough   =   0   'False
  587.          EndProperty
  588.          Height          =   495
  589.          Index           =   25
  590.          Left            =   1560
  591.          Style           =   1  'Graphical
  592.          TabIndex        =   35
  593.          Top             =   1320
  594.          Width           =   615
  595.       End
  596.       Begin VB.CommandButton Command1 
  597.          BackColor       =   &H00C0C0FF&
  598.          Caption         =   "]"
  599.          BeginProperty Font 
  600.             Name            =   "MS Sans Serif"
  601.             Size            =   13.5
  602.             Charset         =   0
  603.             Weight          =   700
  604.             Underline       =   0   'False
  605.             Italic          =   0   'False
  606.             Strikethrough   =   0   'False
  607.          EndProperty
  608.          Height          =   495
  609.          Index           =   24
  610.          Left            =   7920
  611.          Style           =   1  'Graphical
  612.          TabIndex        =   34
  613.          Top             =   840
  614.          Width           =   615
  615.       End
  616.       Begin VB.CommandButton Command1 
  617.          BackColor       =   &H00C0C0FF&
  618.          Caption         =   "["
  619.          BeginProperty Font 
  620.             Name            =   "MS Sans Serif"
  621.             Size            =   13.5
  622.             Charset         =   0
  623.             Weight          =   700
  624.             Underline       =   0   'False
  625.             Italic          =   0   'False
  626.             Strikethrough   =   0   'False
  627.          EndProperty
  628.          Height          =   495
  629.          Index           =   23
  630.          Left            =   7320
  631.          Style           =   1  'Graphical
  632.          TabIndex        =   33
  633.          Top             =   840
  634.          Width           =   615
  635.       End
  636.       Begin VB.CommandButton Command1 
  637.          BackColor       =   &H00C0C0FF&
  638.          Caption         =   "P"
  639.          BeginProperty Font 
  640.             Name            =   "MS Sans Serif"
  641.             Size            =   13.5
  642.             Charset         =   0
  643.             Weight          =   700
  644.             Underline       =   0   'False
  645.             Italic          =   0   'False
  646.             Strikethrough   =   0   'False
  647.          EndProperty
  648.          Height          =   495
  649.          Index           =   22
  650.          Left            =   6720
  651.          Style           =   1  'Graphical
  652.          TabIndex        =   32
  653.          Top             =   840
  654.          Width           =   615
  655.       End
  656.       Begin VB.CommandButton Command1 
  657.          BackColor       =   &H00C0C0FF&
  658.          Caption         =   "O"
  659.          BeginProperty Font 
  660.             Name            =   "MS Sans Serif"
  661.             Size            =   13.5
  662.             Charset         =   0
  663.             Weight          =   700
  664.             Underline       =   0   'False
  665.             Italic          =   0   'False
  666.             Strikethrough   =   0   'False
  667.          EndProperty
  668.          Height          =   495
  669.          Index           =   21
  670.          Left            =   6120
  671.          Style           =   1  'Graphical
  672.          TabIndex        =   31
  673.          Top             =   840
  674.          Width           =   615
  675.       End
  676.       Begin VB.CommandButton Command1 
  677.          BackColor       =   &H00C0C0FF&
  678.          Caption         =   "I"
  679.          BeginProperty Font 
  680.             Name            =   "MS Sans Serif"
  681.             Size            =   13.5
  682.             Charset         =   0
  683.             Weight          =   700
  684.             Underline       =   0   'False
  685.             Italic          =   0   'False
  686.             Strikethrough   =   0   'False
  687.          EndProperty
  688.          Height          =   495
  689.          Index           =   20
  690.          Left            =   5520
  691.          Style           =   1  'Graphical
  692.          TabIndex        =   30
  693.          Top             =   840
  694.          Width           =   615
  695.       End
  696.       Begin VB.CommandButton Command1 
  697.          BackColor       =   &H00C0C0FF&
  698.          Caption         =   "U"
  699.          BeginProperty Font 
  700.             Name            =   "MS Sans Serif"
  701.             Size            =   13.5
  702.             Charset         =   0
  703.             Weight          =   700
  704.             Underline       =   0   'False
  705.             Italic          =   0   'False
  706.             Strikethrough   =   0   'False
  707.          EndProperty
  708.          Height          =   495
  709.          Index           =   19
  710.          Left            =   4920
  711.          Style           =   1  'Graphical
  712.          TabIndex        =   29
  713.          Top             =   840
  714.          Width           =   615
  715.       End
  716.       Begin VB.CommandButton Command1 
  717.          BackColor       =   &H00C0C0FF&
  718.          Caption         =   "Y"
  719.          BeginProperty Font 
  720.             Name            =   "MS Sans Serif"
  721.             Size            =   13.5
  722.             Charset         =   0
  723.             Weight          =   700
  724.             Underline       =   0   'False
  725.             Italic          =   0   'False
  726.             Strikethrough   =   0   'False
  727.          EndProperty
  728.          Height          =   495
  729.          Index           =   18
  730.          Left            =   4320
  731.          Style           =   1  'Graphical
  732.          TabIndex        =   28
  733.          Top             =   840
  734.          Width           =   615
  735.       End
  736.       Begin VB.CommandButton Command1 
  737.          BackColor       =   &H00C0C0FF&
  738.          Caption         =   "T"
  739.          BeginProperty Font 
  740.             Name            =   "MS Sans Serif"
  741.             Size            =   13.5
  742.             Charset         =   0
  743.             Weight          =   700
  744.             Underline       =   0   'False
  745.             Italic          =   0   'False
  746.             Strikethrough   =   0   'False
  747.          EndProperty
  748.          Height          =   495
  749.          Index           =   17
  750.          Left            =   3720
  751.          Style           =   1  'Graphical
  752.          TabIndex        =   27
  753.          Top             =   840
  754.          Width           =   615
  755.       End
  756.       Begin VB.CommandButton Command1 
  757.          BackColor       =   &H00C0C0FF&
  758.          Caption         =   "R"
  759.          BeginProperty Font 
  760.             Name            =   "MS Sans Serif"
  761.             Size            =   13.5
  762.             Charset         =   0
  763.             Weight          =   700
  764.             Underline       =   0   'False
  765.             Italic          =   0   'False
  766.             Strikethrough   =   0   'False
  767.          EndProperty
  768.          Height          =   495
  769.          Index           =   16
  770.          Left            =   3120
  771.          Style           =   1  'Graphical
  772.          TabIndex        =   26
  773.          Top             =   840
  774.          Width           =   615
  775.       End
  776.       Begin VB.CommandButton Command1 
  777.          BackColor       =   &H00C0C0FF&
  778.          Caption         =   "E"
  779.          BeginProperty Font 
  780.             Name            =   "MS Sans Serif"
  781.             Size            =   13.5
  782.             Charset         =   0
  783.             Weight          =   700
  784.             Underline       =   0   'False
  785.             Italic          =   0   'False
  786.             Strikethrough   =   0   'False
  787.          EndProperty
  788.          Height          =   495
  789.          Index           =   15
  790.          Left            =   2520
  791.          Style           =   1  'Graphical
  792.          TabIndex        =   25
  793.          Top             =   840
  794.          Width           =   615
  795.       End
  796.       Begin VB.CommandButton Command1 
  797.          BackColor       =   &H00C0C0FF&
  798.          Caption         =   "W"
  799.          BeginProperty Font 
  800.             Name            =   "MS Sans Serif"
  801.             Size            =   13.5
  802.             Charset         =   0
  803.             Weight          =   700
  804.             Underline       =   0   'False
  805.             Italic          =   0   'False
  806.             Strikethrough   =   0   'False
  807.          EndProperty
  808.          Height          =   495
  809.          Index           =   14
  810.          Left            =   1920
  811.          Style           =   1  'Graphical
  812.          TabIndex        =   24
  813.          Top             =   840
  814.          Width           =   615
  815.       End
  816.       Begin VB.CommandButton Command1 
  817.          BackColor       =   &H00C0C0FF&
  818.          Caption         =   "Q"
  819.          BeginProperty Font 
  820.             Name            =   "MS Sans Serif"
  821.             Size            =   13.5
  822.             Charset         =   0
  823.             Weight          =   700
  824.             Underline       =   0   'False
  825.             Italic          =   0   'False
  826.             Strikethrough   =   0   'False
  827.          EndProperty
  828.          Height          =   495
  829.          Index           =   13
  830.          Left            =   1320
  831.          Style           =   1  'Graphical
  832.          TabIndex        =   23
  833.          Top             =   840
  834.          Width           =   615
  835.       End
  836.       Begin VB.CommandButton Command1 
  837.          BackColor       =   &H00C0C0FF&
  838.          Caption         =   "="
  839.          BeginProperty Font 
  840.             Name            =   "MS Sans Serif"
  841.             Size            =   13.5
  842.             Charset         =   0
  843.             Weight          =   700
  844.             Underline       =   0   'False
  845.             Italic          =   0   'False
  846.             Strikethrough   =   0   'False
  847.          EndProperty
  848.          Height          =   495
  849.          Index           =   12
  850.          Left            =   7800
  851.          Style           =   1  'Graphical
  852.          TabIndex        =   22
  853.          Top             =   360
  854.          Width           =   615
  855.       End
  856.       Begin VB.CommandButton Command1 
  857.          BackColor       =   &H00C0C0FF&
  858.          Caption         =   "-"
  859.          BeginProperty Font 
  860.             Name            =   "MS Sans Serif"
  861.             Size            =   13.5
  862.             Charset         =   0
  863.             Weight          =   700
  864.             Underline       =   0   'False
  865.             Italic          =   0   'False
  866.             Strikethrough   =   0   'False
  867.          EndProperty
  868.          Height          =   495
  869.          Index           =   11
  870.          Left            =   7200
  871.          Style           =   1  'Graphical
  872.          TabIndex        =   21
  873.          Top             =   360
  874.          Width           =   615
  875.       End
  876.       Begin VB.CommandButton Command1 
  877.          BackColor       =   &H00C0C0FF&
  878.          Caption         =   "0"
  879.          BeginProperty Font 
  880.             Name            =   "MS Sans Serif"
  881.             Size            =   13.5
  882.             Charset         =   0
  883.             Weight          =   700
  884.             Underline       =   0   'False
  885.             Italic          =   0   'False
  886.             Strikethrough   =   0   'False
  887.          EndProperty
  888.          Height          =   495
  889.          Index           =   10
  890.          Left            =   6600
  891.          Style           =   1  'Graphical
  892.          TabIndex        =   20
  893.          Top             =   360
  894.          Width           =   615
  895.       End
  896.       Begin VB.CommandButton Command1 
  897.          BackColor       =   &H00C0C0FF&
  898.          Caption         =   "9"
  899.          BeginProperty Font 
  900.             Name            =   "MS Sans Serif"
  901.             Size            =   13.5
  902.             Charset         =   0
  903.             Weight          =   700
  904.             Underline       =   0   'False
  905.             Italic          =   0   'False
  906.             Strikethrough   =   0   'False
  907.          EndProperty
  908.          Height          =   495
  909.          Index           =   9
  910.          Left            =   6000
  911.          Style           =   1  'Graphical
  912.          TabIndex        =   19
  913.          Top             =   360
  914.          Width           =   615
  915.       End
  916.       Begin VB.CommandButton Command1 
  917.          BackColor       =   &H00C0C0FF&
  918.          Caption         =   "8"
  919.          BeginProperty Font 
  920.             Name            =   "MS Sans Serif"
  921.             Size            =   13.5
  922.             Charset         =   0
  923.             Weight          =   700
  924.             Underline       =   0   'False
  925.             Italic          =   0   'False
  926.             Strikethrough   =   0   'False
  927.          EndProperty
  928.          Height          =   495
  929.          Index           =   8
  930.          Left            =   5400
  931.          Style           =   1  'Graphical
  932.          TabIndex        =   18
  933.          Top             =   360
  934.          Width           =   615
  935.       End
  936.       Begin VB.CommandButton Command1 
  937.          BackColor       =   &H00C0C0FF&
  938.          Caption         =   "7"
  939.          BeginProperty Font 
  940.             Name            =   "MS Sans Serif"
  941.             Size            =   13.5
  942.             Charset         =   0
  943.             Weight          =   700
  944.             Underline       =   0   'False
  945.             Italic          =   0   'False
  946.             Strikethrough   =   0   'False
  947.          EndProperty
  948.          Height          =   495
  949.          Index           =   7
  950.          Left            =   4800
  951.          Style           =   1  'Graphical
  952.          TabIndex        =   17
  953.          Top             =   360
  954.          Width           =   615
  955.       End
  956.       Begin VB.CommandButton Command1 
  957.          BackColor       =   &H00C0C0FF&
  958.          Caption         =   "6"
  959.          BeginProperty Font 
  960.             Name            =   "MS Sans Serif"
  961.             Size            =   13.5
  962.             Charset         =   0
  963.             Weight          =   700
  964.             Underline       =   0   'False
  965.             Italic          =   0   'False
  966.             Strikethrough   =   0   'False
  967.          EndProperty
  968.          Height          =   495
  969.          Index           =   6
  970.          Left            =   4200
  971.          Style           =   1  'Graphical
  972.          TabIndex        =   16
  973.          Top             =   360
  974.          Width           =   615
  975.       End
  976.       Begin VB.CommandButton Command1 
  977.          BackColor       =   &H00C0C0FF&
  978.          Caption         =   "5"
  979.          BeginProperty Font 
  980.             Name            =   "MS Sans Serif"
  981.             Size            =   13.5
  982.             Charset         =   0
  983.             Weight          =   700
  984.             Underline       =   0   'False
  985.             Italic          =   0   'False
  986.             Strikethrough   =   0   'False
  987.          EndProperty
  988.          Height          =   495
  989.          Index           =   5
  990.          Left            =   3600
  991.          Style           =   1  'Graphical
  992.          TabIndex        =   15
  993.          Top             =   360
  994.          Width           =   615
  995.       End
  996.       Begin VB.CommandButton Command1 
  997.          BackColor       =   &H00C0C0FF&
  998.          Caption         =   "4"
  999.          BeginProperty Font 
  1000.             Name            =   "MS Sans Serif"
  1001.             Size            =   13.5
  1002.             Charset         =   0
  1003.             Weight          =   700
  1004.             Underline       =   0   'False
  1005.             Italic          =   0   'False
  1006.             Strikethrough   =   0   'False
  1007.          EndProperty
  1008.          Height          =   495
  1009.          Index           =   4
  1010.          Left            =   3000
  1011.          Style           =   1  'Graphical
  1012.          TabIndex        =   14
  1013.          Top             =   360
  1014.          Width           =   615
  1015.       End
  1016.       Begin VB.CommandButton Command1 
  1017.          BackColor       =   &H00C0C0FF&
  1018.          Caption         =   "3"
  1019.          BeginProperty Font 
  1020.             Name            =   "MS Sans Serif"
  1021.             Size            =   13.5
  1022.             Charset         =   0
  1023.             Weight          =   700
  1024.             Underline       =   0   'False
  1025.             Italic          =   0   'False
  1026.             Strikethrough   =   0   'False
  1027.          EndProperty
  1028.          Height          =   495
  1029.          Index           =   3
  1030.          Left            =   2400
  1031.          Style           =   1  'Graphical
  1032.          TabIndex        =   13
  1033.          Top             =   360
  1034.          Width           =   615
  1035.       End
  1036.       Begin VB.CommandButton Command1 
  1037.          BackColor       =   &H00C0C0FF&
  1038.          Caption         =   "2"
  1039.          BeginProperty Font 
  1040.             Name            =   "MS Sans Serif"
  1041.             Size            =   13.5
  1042.             Charset         =   0
  1043.             Weight          =   700
  1044.             Underline       =   0   'False
  1045.             Italic          =   0   'False
  1046.             Strikethrough   =   0   'False
  1047.          EndProperty
  1048.          Height          =   495
  1049.          Index           =   2
  1050.          Left            =   1800
  1051.          Style           =   1  'Graphical
  1052.          TabIndex        =   12
  1053.          Top             =   360
  1054.          Width           =   615
  1055.       End
  1056.       Begin VB.CommandButton Command1 
  1057.          BackColor       =   &H00C0C0FF&
  1058.          Caption         =   "1"
  1059.          BeginProperty Font 
  1060.             Name            =   "MS Sans Serif"
  1061.             Size            =   13.5
  1062.             Charset         =   0
  1063.             Weight          =   700
  1064.             Underline       =   0   'False
  1065.             Italic          =   0   'False
  1066.             Strikethrough   =   0   'False
  1067.          EndProperty
  1068.          Height          =   495
  1069.          Index           =   1
  1070.          Left            =   1200
  1071.          Style           =   1  'Graphical
  1072.          TabIndex        =   11
  1073.          Top             =   360
  1074.          Width           =   615
  1075.       End
  1076.    End
  1077.    Begin VB.Label Label13 
  1078.       BackColor       =   &H00FFFFFF&
  1079.       BackStyle       =   0  'Transparent
  1080.       BeginProperty Font 
  1081.          Name            =   "MS Sans Serif"
  1082.          Size            =   12
  1083.          Charset         =   0
  1084.          Weight          =   700
  1085.          Underline       =   0   'False
  1086.          Italic          =   0   'False
  1087.          Strikethrough   =   0   'False
  1088.       EndProperty
  1089.       ForeColor       =   &H00FF8080&
  1090.       Height          =   495
  1091.       Left            =   7440
  1092.       TabIndex        =   61
  1093.       Top             =   720
  1094.       Width           =   2295
  1095.    End
  1096.    Begin VB.Label Label12 
  1097.       Caption         =   "所用时间"
  1098.       BeginProperty Font 
  1099.          Name            =   "MS Sans Serif"
  1100.          Size            =   12
  1101.          Charset         =   0
  1102.          Weight          =   700
  1103.          Underline       =   0   'False
  1104.          Italic          =   0   'False
  1105.          Strikethrough   =   0   'False
  1106.       EndProperty
  1107.       Height          =   375
  1108.       Left            =   6240
  1109.       TabIndex        =   60
  1110.       Top             =   720
  1111.       Width           =   1095
  1112.    End
  1113.    Begin VB.Label Label11 
  1114.       BackStyle       =   0  'Transparent
  1115.       BeginProperty Font 
  1116.          Name            =   "MS Sans Serif"
  1117.          Size            =   9.75
  1118.          Charset         =   0
  1119.          Weight          =   700
  1120.          Underline       =   0   'False
  1121.          Italic          =   0   'False
  1122.          Strikethrough   =   0   'False
  1123.       EndProperty
  1124.       Height          =   375
  1125.       Left            =   7680
  1126.       TabIndex        =   58
  1127.       Top             =   120
  1128.       Width           =   1215
  1129.    End
  1130.    Begin VB.Label Label10 
  1131.       BeginProperty Font 
  1132.          Name            =   "MS Sans Serif"
  1133.          Size            =   24
  1134.          Charset         =   0
  1135.          Weight          =   700
  1136.          Underline       =   0   'False
  1137.          Italic          =   0   'False
  1138.          Strikethrough   =   0   'False
  1139.       EndProperty
  1140.       ForeColor       =   &H00FF8080&
  1141.       Height          =   615
  1142.       Left            =   3840
  1143.       TabIndex        =   57
  1144.       Top             =   5040
  1145.       Width           =   855
  1146.    End
  1147.    Begin VB.Image Image1 
  1148.       Height          =   285
  1149.       Left            =   4560
  1150.       Picture         =   "typeForm.frx":08CA
  1151.       Top             =   960
  1152.       Width           =   285
  1153.    End
  1154.    Begin VB.Label Label3 
  1155.       BackStyle       =   0  'Transparent
  1156.       Caption         =   "所打正确字符"
  1157.       BeginProperty Font 
  1158.          Name            =   "MS Sans Serif"
  1159.          Size            =   12
  1160.          Charset         =   0
  1161.          Weight          =   700
  1162.          Underline       =   0   'False
  1163.          Italic          =   0   'False
  1164.          Strikethrough   =   0   'False
  1165.       EndProperty
  1166.       Height          =   255
  1167.       Left            =   2040
  1168.       TabIndex        =   4
  1169.       Top             =   5040
  1170.       Width           =   1695
  1171.    End
  1172.    Begin VB.Label Label2 
  1173.       BeginProperty Font 
  1174.          Name            =   "MS Sans Serif"
  1175.          Size            =   9.75
  1176.          Charset         =   0
  1177.          Weight          =   700
  1178.          Underline       =   0   'False
  1179.          Italic          =   0   'False
  1180.          Strikethrough   =   0   'False
  1181.       EndProperty
  1182.       Height          =   240
  1183.       Left            =   1560
  1184.       TabIndex        =   3
  1185.       Top             =   5520
  1186.       Width           =   1020
  1187.    End
  1188.    Begin VB.Label Label1 
  1189.       BackStyle       =   0  'Transparent
  1190.       Caption         =   "练习时间:"
  1191.       BeginProperty Font 
  1192.          Name            =   "MS Sans Serif"
  1193.          Size            =   12
  1194.          Charset         =   0
  1195.          Weight          =   700
  1196.          Underline       =   0   'False
  1197.          Italic          =   0   'False
  1198.          Strikethrough   =   0   'False
  1199.       EndProperty
  1200.       Height          =   375
  1201.       Left            =   6240
  1202.       TabIndex        =   2
  1203.       Top             =   120
  1204.       Width           =   1095
  1205.    End
  1206.    Begin VB.Menu set 
  1207.       Caption         =   "测试设置"
  1208.       Begin VB.Menu typemain 
  1209.          Caption         =   "主界面"
  1210.       End
  1211.       Begin VB.Menu typetime 
  1212.          Caption         =   "时间设置"
  1213.       End
  1214.       Begin VB.Menu exit 
  1215.          Caption         =   "退出"
  1216.       End
  1217.    End
  1218. End
  1219. Attribute VB_Name = "typeForm"
  1220. Attribute VB_GlobalNameSpace = False
  1221. Attribute VB_Creatable = False
  1222. Attribute VB_PredeclaredId = True
  1223. Attribute VB_Exposed = False
  1224. Option Explicit
  1225. Dim before_random_number As Integer '记录上次要打的字符
  1226. Dim type_current_char As String * 1 '记录当前需要打的字符
  1227. 'Dim first_number As Integer
  1228. Dim type_right_click As String * 1 '正确的打字字符数
  1229.  '键盘数组
  1230.  Dim after_number As Integer  '1~~44
  1231.  Public curr_time As Long
  1232. '该函数为 在产生的随机数后在 按扭的控件数组选择一个按扭 变黄
  1233. '作为要打的字符
  1234. Private Sub Command1_Click(Index As Integer)
  1235.   Select Case Index
  1236.     Case 1 '1
  1237.      
  1238.      Command1(Index).BackColor = &H80FFFF
  1239.      before_random_number = Index
  1240.      
  1241.     Case 2 '1
  1242.      Command1(Index).BackColor = &H80FFFF
  1243.       before_random_number = Index
  1244.     Case 3 '3
  1245.      Command1(Index).BackColor = &H80FFFF
  1246.       before_random_number = Index
  1247.      Case 4 '4
  1248.      Command1(Index).BackColor = &H80FFFF
  1249.       before_random_number = Index
  1250.      Case 5 '5
  1251.      Command1(Index).BackColor = &H80FFFF
  1252.       before_random_number = Index
  1253.      Case 6 '6
  1254.      Command1(Index).BackColor = &H80FFFF
  1255.       before_random_number = Index
  1256.      Case 7 '7
  1257.      Command1(Index).BackColor = &H80FFFF
  1258.       before_random_number = Index
  1259.      Case 8 '8
  1260.      Command1(Index).BackColor = &H80FFFF
  1261.       before_random_number = Index
  1262.      Case 9 '9
  1263.      Command1(Index).BackColor = &H80FFFF
  1264.       before_random_number = Index
  1265.      Case 10
  1266.      Command1(Index).BackColor = &H80FFFF
  1267.       before_random_number = Index
  1268.      Case 11
  1269.       Command1(Index).BackColor = &H80FFFF
  1270.       before_random_number = Index
  1271.      Case 12
  1272.       Command1(Index).BackColor = &H80FFFF
  1273.       before_random_number = Index
  1274.      Case 13
  1275.       Command1(Index).BackColor = &H80FFFF
  1276.       before_random_number = Index
  1277.     Case 14
  1278.        Command1(Index).BackColor = &H80FFFF
  1279.       before_random_number = Index
  1280.     Case 15
  1281.        Command1(Index).BackColor = &H80FFFF
  1282.        before_random_number = Index
  1283.     Case 16
  1284.       Command1(Index).BackColor = &H80FFFF
  1285.       before_random_number = Index
  1286.     Case 17
  1287.       Command1(Index).BackColor = &H80FFFF
  1288.       before_random_number = Index
  1289.     Case 18
  1290.       Command1(Index).BackColor = &H80FFFF
  1291.       before_random_number = Index
  1292.     Case 19
  1293.        Command1(Index).BackColor = &H80FFFF
  1294.        before_random_number = Index
  1295.     Case 19
  1296.        Command1(Index).BackColor = &H80FFFF
  1297.        before_random_number = Index
  1298.     Case 20
  1299.         Command1(Index).BackColor = &H80FFFF
  1300.         before_random_number = Index
  1301.     Case 21
  1302.         Command1(Index).BackColor = &H80FFFF
  1303.         before_random_number = Index
  1304.          Case 22
  1305.         Command1(Index).BackColor = &H80FFFF
  1306.         before_random_number = Index
  1307.          Case 23
  1308.         Command1(Index).BackColor = &H80FFFF
  1309.         before_random_number = Index
  1310.          Case 24
  1311.         Command1(Index).BackColor = &H80FFFF
  1312.         before_random_number = Index
  1313.          Case 25
  1314.         Command1(Index).BackColor = &H80FFFF
  1315.         before_random_number = Index
  1316.          Case 26
  1317.         Command1(Index).BackColor = &H80FFFF
  1318.         before_random_number = Index
  1319.          Case 27
  1320.         Command1(Index).BackColor = &H80FFFF
  1321.         before_random_number = Index
  1322.          Case 28
  1323.         Command1(Index).BackColor = &H80FFFF
  1324.         before_random_number = Index
  1325.          Case 29
  1326.         Command1(Index).BackColor = &H80FFFF
  1327.         before_random_number = Index
  1328.          Case 30
  1329.         Command1(Index).BackColor = &H80FFFF
  1330.         before_random_number = Index
  1331.          Case 31
  1332.         Command1(Index).BackColor = &H80FFFF
  1333.         before_random_number = Index
  1334.          Case 32
  1335.         Command1(Index).BackColor = &H80FFFF
  1336.         before_random_number = Index
  1337.          Case 33
  1338.         Command1(Index).BackColor = &H80FFFF
  1339.         before_random_number = Index
  1340.          Case 34
  1341.         Command1(Index).BackColor = &H80FFFF
  1342.         before_random_number = Index
  1343.          Case 35
  1344.         Command1(Index).BackColor = &H80FFFF
  1345.         before_random_number = Index
  1346.          Case 36
  1347.         Command1(Index).BackColor = &H80FFFF
  1348.         before_random_number = Index
  1349.          Case 37
  1350.         Command1(Index).BackColor = &H80FFFF
  1351.         before_random_number = Index
  1352.          Case 38
  1353.         Command1(Index).BackColor = &H80FFFF
  1354.         before_random_number = Index
  1355.          Case 39
  1356.         Command1(Index).BackColor = &H80FFFF
  1357.         before_random_number = Index
  1358.       
  1359.          Case 40
  1360.         Command1(Index).BackColor = &H80FFFF
  1361.         before_random_number = Index
  1362.          Case 41
  1363.         Command1(Index).BackColor = &H80FFFF
  1364.         before_random_number = Index
  1365.          Case 42
  1366.         Command1(Index).BackColor = &H80FFFF
  1367.         before_random_number = Index
  1368.          Case 43
  1369.         Command1(Index).BackColor = &H80FFFF
  1370.         before_random_number = Index
  1371.          Case 44
  1372.         Command1(Index).BackColor = &H80FFFF
  1373.         before_random_number = Index
  1374.          Case 45
  1375.         Command1(Index).BackColor = &H80FFFF
  1376.         before_random_number = Index
  1377.         End Select
  1378.   
  1379.      End Sub
  1380. '判断用户 所打字符是否正确
  1381. '测试开始
  1382. Private Sub Command2_Click()
  1383. Dim i As Integer
  1384. Dim image_path As String
  1385. If Right(App.Path, 1) <> "" Then
  1386.   image_path = App.Path & "" & "Hear.ico"
  1387.  Else
  1388.  image_path = App.Path & "Hear.ico"
  1389. End If
  1390. Image1.Picture = LoadPicture(image_path)
  1391. Timer1.Enabled = True '启动计时器
  1392. 'first_number = Int(10 * Rnd + 1) '第一个键盘数
  1393. 'after_number = first_number
  1394. 'Call Command1_Click(first_number)
  1395. before_random_number = 0
  1396. type_allchar = 0
  1397. Timer2.Enabled = True
  1398. curr_time = 0 '打字时间停止器
  1399. mm = 0
  1400. ss = 0
  1401. ms = 0
  1402. '为保证在从新开始时 所以button 为红色
  1403. For i = 1 To 45 Step 1
  1404.  Command1(i).BackColor = &HC0C0FF
  1405. Next i
  1406. Command2.Enabled = False
  1407. End Sub
  1408. Private Sub Command3_Click()
  1409. End
  1410. End Sub
  1411. Private Sub Command4_Click()
  1412. Unload Me '卸在窗体
  1413. mainForm.Show '显示主界面
  1414. End Sub
  1415. Private Sub exit_Click()
  1416. End
  1417. End Sub
  1418. Private Sub Form_KeyPress(KeyAscii As Integer)
  1419. ' Debug.Print KeyAscii
  1420.  If type_current_char = UCase(Chr(KeyAscii)) Then '打字正确
  1421.   Label10.Caption = ""
  1422.   type_right = type_right + 1
  1423.   Label7.Caption = Str(type_right)
  1424.   Command1(after_number).BackColor = &HC0C0FF
  1425.   Label10.Caption = UCase(Chr(KeyAscii))
  1426.  ' Call Timer1_Timer
  1427.  End If
  1428. End Sub
  1429. Private Sub Form_Load()
  1430. '停止计时器
  1431. type_right = 0 '测试正确的字符数
  1432. Timer1.Enabled = False
  1433. 'Command2.BackColor = &HC0C0FF
  1434. Label11.Caption = type_show
  1435. '当前所用时间赋为 0
  1436. mm = 0
  1437. ss = 0
  1438. ms = 0
  1439. '定义时间显示格式
  1440. Label13.Caption = Format(mm, "00") + "分" + ":" + _
  1441.                   Format(ss, "00") + "秒" + ":" + _
  1442.                   Format(ms, "00") + "毫"
  1443. curr_time = 0
  1444. End Sub
  1445. '在卸在窗体是做清除工作
  1446. Private Sub Form_Unload(Cancel As Integer)
  1447. End Sub
  1448. '该计时器在键盘上随机产生字符
  1449. Private Sub Timer1_Timer()
  1450.  Select Case before_random_number
  1451.    Case 0
  1452.    Case 1
  1453.     Command1(before_random_number).BackColor = &HC0C0FF
  1454.     
  1455.    Case 2
  1456.    Command1(before_random_number).BackColor = &HC0C0FF
  1457.    Case 3
  1458.    Command1(before_random_number).BackColor = &HC0C0FF
  1459.    Case 4
  1460.    Command1(before_random_number).BackColor = &HC0C0FF
  1461.    Case 5
  1462.    Command1(before_random_number).BackColor = &HC0C0FF
  1463.    Case 6
  1464.    Command1(before_random_number).BackColor = &HC0C0FF
  1465.    Case 7
  1466.    Command1(before_random_number).BackColor = &HC0C0FF
  1467.    Case 8
  1468.    Command1(before_random_number).BackColor = &HC0C0FF
  1469.    Case 9
  1470.    Command1(before_random_number).BackColor = &HC0C0FF
  1471.    Case 10
  1472.    Command1(before_random_number).BackColor = &HC0C0FF
  1473.     Case 11
  1474.    Command1(before_random_number).BackColor = &HC0C0FF
  1475.     Case 12
  1476.    Command1(before_random_number).BackColor = &HC0C0FF
  1477.     Case 13
  1478.    Command1(before_random_number).BackColor = &HC0C0FF
  1479.     Case 14
  1480.    Command1(before_random_number).BackColor = &HC0C0FF
  1481.     Case 15
  1482.    Command1(before_random_number).BackColor = &HC0C0FF
  1483.     Case 16
  1484.    Command1(before_random_number).BackColor = &HC0C0FF
  1485.     Case 17
  1486.    Command1(before_random_number).BackColor = &HC0C0FF
  1487.     Case 18
  1488.    Command1(before_random_number).BackColor = &HC0C0FF
  1489.     Case 19
  1490.    Command1(before_random_number).BackColor = &HC0C0FF
  1491.     Case 20
  1492.    Command1(before_random_number).BackColor = &HC0C0FF
  1493.      Case 21
  1494.    Command1(before_random_number).BackColor = &HC0C0FF
  1495.     Case 22
  1496.    Command1(before_random_number).BackColor = &HC0C0FF
  1497.     Case 23
  1498.    Command1(before_random_number).BackColor = &HC0C0FF
  1499.     Case 24
  1500.    Command1(before_random_number).BackColor = &HC0C0FF
  1501.     Case 25
  1502.    Command1(before_random_number).BackColor = &HC0C0FF
  1503.     Case 26
  1504.    Command1(before_random_number).BackColor = &HC0C0FF
  1505.     Case 27
  1506.    Command1(before_random_number).BackColor = &HC0C0FF
  1507.     Case 28
  1508.    Command1(before_random_number).BackColor = &HC0C0FF
  1509.     Case 29
  1510.    Command1(before_random_number).BackColor = &HC0C0FF
  1511.     Case 30
  1512.    Command1(before_random_number).BackColor = &HC0C0FF
  1513.     Case 31
  1514.    Command1(before_random_number).BackColor = &HC0C0FF
  1515.     Case 32
  1516.    Command1(before_random_number).BackColor = &HC0C0FF
  1517.     Case 33
  1518.    Command1(before_random_number).BackColor = &HC0C0FF
  1519.     Case 34
  1520.    Command1(before_random_number).BackColor = &HC0C0FF
  1521.     Case 35
  1522.    Command1(before_random_number).BackColor = &HC0C0FF
  1523.     Case 36
  1524.    Command1(before_random_number).BackColor = &HC0C0FF
  1525.     Case 37
  1526.    Command1(before_random_number).BackColor = &HC0C0FF
  1527.     Case 38
  1528.    Command1(before_random_number).BackColor = &HC0C0FF
  1529.     Case 39
  1530.    Command1(before_random_number).BackColor = &HC0C0FF
  1531.     Case 40
  1532.    Command1(before_random_number).BackColor = &HC0C0FF
  1533.     Case 41
  1534.    Command1(before_random_number).BackColor = &HC0C0FF
  1535.     Case 42
  1536.    Command1(before_random_number).BackColor = &HC0C0FF
  1537.     Case 43
  1538.    Command1(before_random_number).BackColor = &HC0C0FF
  1539.     Case 44
  1540.    Command1(before_random_number).BackColor = &HC0C0FF
  1541.     Case 45
  1542.    Command1(before_random_number).BackColor = &HC0C0FF
  1543.   End Select
  1544.  Randomize
  1545.  '随机产生1~44个数字与键盘上的一个键对应
  1546.  
  1547.  after_number = Int(45 * Rnd + 1)
  1548.  'Command1(after_number).SetFocus
  1549. ' Debug.Print after_number
  1550.  Call Command1_Click(after_number)
  1551.  type_allchar = type_allchar + 1 '记录一共的字符数
  1552.  Label5.Caption = Str(type_allchar)
  1553.  type_current_char = Command1(after_number).Caption '要打的字符
  1554.  
  1555. End Sub
  1556. '该时钟显示当前打字所用时间
  1557. '1000 毫秒等于 1 秒
  1558. '在vb中当 时钟的间隔 小于50ms(Timer2.Intreval<50) 时钟的性能是比较差的
  1559. '要真的精确到毫秒要用到 Windows 的API 的两个函数
  1560. '(1)Private Declare Function QueryPerformanceFrequency Lib "kernel32" _
  1561.               (lpFrequency As LARGE_INTEGER) As Long
  1562. '(2)Private Declare Function QueryPerformanceCounter Lib "kernel32" _
  1563.         (lpPerformanceCount As LARGE_INTEGER) As Long
  1564. '怕把函数搞难了 没用
  1565. '//这个地址有介绍
  1566. 'http://www.programfan.com/article/showarticle.asp?id=1375
  1567. '为了保证性能 为让 1s =100 ms
  1568. Private Sub Timer2_Timer()
  1569.  
  1570.  curr_time = CLng(curr_time) + 1
  1571. ms = ms + 1 '毫秒+1
  1572. If ms >= 100 Then '1ms =1000s
  1573.  ms = 0
  1574.  ss = ss + 1 '秒+1
  1575.   If ss >= 60 Then
  1576.      mm = mm + 1
  1577.       ss = 0
  1578.       End If
  1579. End If
  1580. Label13.Caption = Format(mm, "00") + "分" + ":" + _
  1581.                   Format(ss, "00") + "秒" + ":" + _
  1582.                   Format(ms, "00") + "毫"
  1583.                   DoEvents
  1584.               '测试时间到了 停止测试
  1585.    If curr_time >= (type_time / 10) Then
  1586.    
  1587.    Timer2.Enabled = False
  1588.    Timer1.Enabled = False
  1589.    '计算正确率
  1590.    type_percent = (type_right / type_allchar) * 100
  1591.   
  1592.    Label9.Caption = Str(type_percent) & "%"
  1593.    Command2.Enabled = True
  1594.    End If
  1595.    
  1596. End Sub
  1597. '返回到主界面
  1598. Private Sub typemain_Click()
  1599. Unload Me '卸在窗体
  1600. mainForm.Show '显示主界面
  1601. End Sub
  1602. ' 重新设置时间
  1603. Private Sub typetime_Click()
  1604. Unload Me
  1605. setgameForm.Show
  1606. End Sub