VB icon

!!!*!Make a cool EASY Lotto Game!*!!!

Submitted on: 1/2/2015 11:21:00 PM
By: SeeD (from psc cd)  
Level: Not Given
User Rating: By 15 Users
Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 8033
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
' Name: !!!*!Make a cool EASY Lotto Game!*!!!
' Description:MAKE AN EASY LOTTO GAME!!! ***UPDATED***
' By: SeeD (from psc cd)
' Inputs:You're going to need 3 Labels to start. You can add more once you get the hang of it. You also need 1 Command button. Make it's caption "OK", and the Labels captions blank. Follow the simple instructions below.
' Assumes:You can alter this code to your convienience. Here are some nifty things you could change:
 You could use text boxes instead of labels. You would have to change every "Label1.Caption" to "Text1.Text" and so on.
 You can add as many more text boxes or labels as you'd like, as long as you adjust the code accrodingly.
 If your smart enough, you could make it a simple password entry screen, but you'd have to do some easy error handling and you'd have to use text boxes instead of labels.
 If your smart enough, you could make a simple lotto game to share with your friends and family. - SeeD (o:

Private Sub Command1_Click()
 Label1.Caption = Int(rnd * 10)
 Label2.Caption = Int(rnd * 10)
 Label3.Caption = Int(rnd * 10)
If (Label1.Caption = Label2.Caption) And (Label3.Caption = Label2.Caption) Then
 MsgBox "You Win!", 8, "Winner!"
End If
End Sub

Other 20 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

11/26/2016 8:12:45 AMJJ Banks

But you do not know what lotto means.
This is rather a good example of an "one-arm" bandit in a casino.

(If this comment was disrespectful, please report it.)


Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.