急求。。。修改该编程使其正常运行
vb6.0吧
全部回复
仅看楼主
level 7
Option ExplicitDim exp As String, result As Single, nok As Integer, nerror As IntegerDim op As Integer, num1 As Integer, num2 As Integer, nop As String
Private Sub Command1_Click()If Command1.Caption = "&s开始" ThenTimer1.Enabled = TrueCommand1.Caption = "&c暂停"ElseTimer1.Enabled = FalseCommand1.Caption = "&s开始"Text2.SetFocusEnd IfEnd Sub
Private Sub Command2_Click()Picture1.Print String(20, "◆")Picture1.Print "一共计算了"; nok + nerror; "题"Picture1.Print "得分" & Int(nok / (nerror + nok) * 100)End Sub
Private Sub Command3_Click()EndEnd Sub
Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If Val(Text2) = result Then Picture1.Print exp; result; "√" nok = nok + 1 Else Picture1.Print exp; result; "×" nerror = nerror + 1 End IfText2 = ""End IfEnd Sub
Private Sub Timer1_Timer()RandomizeDim op As Integernum1 = Int(Rnd * (9)) + 1num2 = Int(Rnd * (9)) + 1op = Int(Rnd * (4)) + 1 Text1.ForeColor = RGB(256 * Rnd, 256 * Rnd, 256 * Rnd)Text2.ForeColor = RGB(256 * Rnd, 256 * Rnd, 256 * Rnd)
If Val(Text1) < 0 Then Timer1.Enabled = False Text1.Text = "" Text1.SetFocus ElseText1 = Str(Val(Text1) - 1)End IfSelect Case op Case 1 nop = "+" result = num1 + num2 Case 2 nop = "-" result = num1 - num2 Case 3 nop = "*" result = num1 * num2 Case Else nop = "/" result = num1 / num2End Select exp = num1 & nop & num2 & "="Label2.Caption = expEnd Sub
2013年04月19日 01点04分 1
level 2
姑娘一枚,找个男友
+我QQ,9㊀㊄0㊂8709

2013年04月19日 05点04分 2
晕。。。。
2013年05月08日 08点05分
level 1
你调试的时候,光标停在哪行?
2013年05月08日 23点05分 3
请输入秒数后面那个文本框的。。。。
2013年05月10日 04点05分
1