VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A Cool Lottery Game

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"

Rate A Cool Lottery Game

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

Download this snippet    Add to My Saved Code

A Cool Lottery Game Comments

No comments have been posted about A Cool Lottery Game. Why not be the first to post a comment about A Cool Lottery Game.

Post your comment

Subject:
Message:
0/1000 characters