主题:怎样用VB做一个简单的抽奖程序
大家好,我是VB的初学者,麻烦大家告诉我怎样用VB编写一个简单的抽奖程序可以吗?要简单一点的。我做了一半,但是不知道要怎样才能停下来。下面的是我写的代码:
Private Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = True
End Sub
Private Sub Timer1_Timer()
Dim a As Integer
a = Rnd * 100
Label1.Caption = a
End Sub
Private Sub Timer2_Timer()
Dim m As Integer
m = Val(Text1.Text) * 60
If m < 3 Then
Timer1.Enabled = False
Timer2.Enabled = False
Else
End If
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = True
End Sub
Private Sub Timer1_Timer()
Dim a As Integer
a = Rnd * 100
Label1.Caption = a
End Sub
Private Sub Timer2_Timer()
Dim m As Integer
m = Val(Text1.Text) * 60
If m < 3 Then
Timer1.Enabled = False
Timer2.Enabled = False
Else
End If
End Sub