求 用VB做个数字抽奖程序 从1到32的号码 谢谢
有开始跟停止的那种从1到32抽一个数出来的有没有做好的谢谢拉给我发到邮箱里724065409@QQ.COM谢谢大家拉...
有开始 跟停止的那种 从1到32 抽一个数出来的
有没有做好的 谢谢拉 给我发到邮箱里 724065409@QQ.COM 谢谢大家拉 展开
有没有做好的 谢谢拉 给我发到邮箱里 724065409@QQ.COM 谢谢大家拉 展开
3个回答
展开全部
双色球随机选:
Private Sub Command1_Click()
Dim a(6) As Integer
Dim b As Integer
For i = 1 To 6
a(i) = Int(Rnd() * (1 + (33 - 1))) + 1
For j = 1 To i - 1
If a(i) = a(j) Then
i = i - 1
End If
Next
Next
For i = 1 To 6
For j = i + 1 To 6
If a(i) < a(j) Then
T = a(i): a(i) = a(j): a(j) = T
End If
Next
Next
b = Int(Rnd() * (1 + (16 - 1))) + 1
Text1.Text = a(6) & " " & a(5) & " " & a(4) _
& " " & a(3) & " " & a(2) & " " & a(1) & " +" & b
End Sub
Private Sub Command1_Click()
Dim a(6) As Integer
Dim b As Integer
For i = 1 To 6
a(i) = Int(Rnd() * (1 + (33 - 1))) + 1
For j = 1 To i - 1
If a(i) = a(j) Then
i = i - 1
End If
Next
Next
For i = 1 To 6
For j = i + 1 To 6
If a(i) < a(j) Then
T = a(i): a(i) = a(j): a(j) = T
End If
Next
Next
b = Int(Rnd() * (1 + (16 - 1))) + 1
Text1.Text = a(6) & " " & a(5) & " " & a(4) _
& " " & a(3) & " " & a(2) & " " & a(1) & " +" & b
End Sub
展开全部
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
For I = 0 To 5
Label1(I).FontSize = 48
Next I
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Randomize
For I = 0 To 5
Randomize
Label1(I).Caption = Int(Rnd() * 33)
Next I
End Sub
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
For I = 0 To 5
Label1(I).FontSize = 48
Next I
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Randomize
For I = 0 To 5
Randomize
Label1(I).Caption = Int(Rnd() * 33)
Next I
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Command1_Click()
Print Int(Rnd * 32 + 1)
End Sub
Print Int(Rnd * 32 + 1)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询