vb打字游戏,本人刚完成设计,真正是你想要的!
'开始游戏 Private Sub Command3_Click() If Option1.Value Then Timer1.Interval = 1 Timer2.Interval = 0 Label7.Caption = "" Label1.Top = 8760 Label6.Top = 8760 Label1.Visible = True Label6.Visible = True End If If Option2.Value Then Timer2.Interval = 1 Timer1.Interval = 0 Label1.Caption = "" Label6.Caption = "" Randomize Cls a = Array("one", "two", "three", "free", "feel", "fly", "lacking", "the", "power", "that ") x = Int(Rnd * (UBound(a) + 1)) Label7.Caption = a(x) Label7.Top = 0 Label7.Visible = True End If Text1.SetFocus End Sub Private Sub Form_KeyPress(KeyAscii As Integer) '判断简单时是否打中,并使成绩加一 If Option1.Value Then Timer1.Interval = 1 If KeyAscii = Asc(Label1.Caption) Then Label1.Top = 0 Label1.Left = Rnd() * 10800 Label1.Caption = Chr$(Rnd() * 26 + 97) Label2.Caption = Label2.Caption + 1 End If
下载地址
用户评论
用了这么久才来评价,让我学到了很多VB知识,比如排序,随机产生数等,不过有点小瑕疵
能够运行,不过有点小瑕疵
跟网上的都差不多,能狗运行的。
不错好东西 正好用到