需要一个1-12随机抽号(不可重复)的vb小程序 界面清晰 美观 1天内要 谢谢
需要一个1-12随机抽号(不可重复)的vb小程序界面清晰美观1天内要谢5分问题补充:能让观众看到数字滚动像转盘一样不知能否做到选完一个后只有两个数字滚动只是举例而已,就是...
需要一个1-12随机抽号(不可重复)的vb小程序 界面清晰 美观 1天内要 谢 5分
问题补充:能让观众看到数字滚动 像转盘一样 不知能否做到
选完一个后 只有两个数字滚动
只是举例而已,就是滚动显示,多次抽取,凡被抽中的不再下一次循环中显示 展开
问题补充:能让观众看到数字滚动 像转盘一样 不知能否做到
选完一个后 只有两个数字滚动
只是举例而已,就是滚动显示,多次抽取,凡被抽中的不再下一次循环中显示 展开
3个回答
展开全部
Dim stmp As String
Dim k As Integer
Private Sub Form_Load()
k = 0
End Sub
Private Sub Command5_Click()
Dim s1 As String, s As Integer
Randomize Time()
If stmp = "" Then stmp = ","
Do While k < 12
s = Int(Rnd * (12 - 1 + 1) + 1)
If InStr(1, stmp, "," & s & ",") = 0 Then
k = k + 1
Exit Do
End If
Loop
If s <> 0 Then
stmp = stmp & s & ","
Print s
Else
MsgBox "完了"
End If
End Sub
Dim k As Integer
Private Sub Form_Load()
k = 0
End Sub
Private Sub Command5_Click()
Dim s1 As String, s As Integer
Randomize Time()
If stmp = "" Then stmp = ","
Do While k < 12
s = Int(Rnd * (12 - 1 + 1) + 1)
If InStr(1, stmp, "," & s & ",") = 0 Then
k = k + 1
Exit Do
End If
Loop
If s <> 0 Then
stmp = stmp & s & ","
Print s
Else
MsgBox "完了"
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询