by homo rainbow (1 Submission)
Category: Complete Applications
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (2 Votes)
A cool wat to play the lottery.
Assumes
'first you need to make a text box then copy it 5 times.this makes 6 text boxs.
'second you need make a label, rename it lblLottery then copy it 5 times. this makes 6
'make 2 command buttons, make command2's caption "Submit The Numbers"
'make command1's caption "Play Again"
dim T as integer
dim random as integer
dim I as integer
Private Sub command2_Click()
For I = 0 To 5
Randomize
Random = Int((Rnd * 51) + 1)
lblLottery(I).Caption = Random
Next I
End Sub
Private Sub Command1_Click()
Text1(0).SetFocus
For T = 0 To 5
Text1(T) = ""
Next T
For I = 0 To 5
lblLottery(I).Caption = ""
Next I
End Sub