Private Sub Command1_Click()
Text1.Text = Val(Text1.Text) + 1
End Sub
Private Sub Command2_Click()
Text2.Text = Val(Text2.Text) + 1
End Sub
Private Sub Command3_Click()
Text3.Text = Val(Text3.Text) + 1
End Sub
既然是选择题,那肯定有很多题,你可以在页面当中添加一个“下一题”的按钮,再把这个按钮的TabIndex属性搏卜设置为0,这样在显示页面时,基贺穗默认选中的是“下一题”的这拍轮个按钮,这样的页面才比较最合理。PS:在做选择题这样的程序时,最好采用数据库编程,就是将题目和答案都放在数据库中,每次执行时,题目都是从数据库中提取,这样即使题目有上百题,VB中只要有一个界面就行了,这样更加方便。
Dim a(20) As IntegerPrivate Sub Form_click()
t = Val(InputBox("租陵悔输入投票数汪滑字"))
Select Case t
Case 1 To 20
a(t) = a(t) + 1
End Select
Me.Cls
For I = 1 To 20
If I Mod 5 = 0 Then
Else
Print Format(I, "00") &":" &a(I) &"次弊正 "
End If
Next
End Sub
Private Sub Form_Load()
Me.AutoRedraw = True
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)