Lucky Numbers


Home | News | Freeware | Code | About Us | Contact Us | Links

Freeware: Graphic Viewer | Gett'n Jiggy | Text Editor | Calculator


Description: Slot machine game. Get two or more of the same numbers in a spin and you win! Works on credits, you start with 25 each spin cost 1 and you gain 2 for each win. Hit three of the same numbers and win 5 credits.

Lucky Numbers 1.2 View Code or Download it

Size: 36K

Lucky Number Screen Shot

Lucky Number Screen Shot

Lucky Number Screen Shot

E-Mail us If you would like to know when this program is updated or if you need the cheats for it (Not found in the code printed here).


Code

Top

Private Sub Spin_Click()
Dim intCredit As Integer
intCredit = Val(txtCredit.Text)
Text1 = Int(Rnd * 10)
Text2 = Int(Rnd * 10)
Text3 = Int(Rnd * 10)
If (Text1.Text = Text2.Text) Or (Text2.Text = Text3.Text) Or (Text3.Text = Text1.Text) Then
lblWin.Caption = "You Win!"
txtCredit.Text = intCredit + 2
Else
lblWin.Caption = "Try Again..."
txtCredit.Text = intCredit - 1
End If
If Text1.Text = Text2.Text And Text1.Text = Text3.Text Then
lblWin.Caption = "Jackpot!!!"
Beep
txtCredit.Text = intCredit + 5
End If
If Val(txtCredit.Text) <= 0 Then
lblWin.Caption = "Out of Creidts!"
Command1.Enabled = False
frmAbout.Show
txtCredit.Font = 10
txtCredit.Text = "Zero!!!"
End If
If Val(txtCredit.Text) >= 100 Then
lblWin.Caption = "You're Too Good!"
Command1.Enabled = False
frmAbout.Show
txtCredit.Font = 10
txtCredit.Text = "A lot!!"
End If
End Sub
Private Sub Form_Load()
Form1.Top = (Screen.Height - Form1.Height) / 2
Form1.Left = (Screen.Width - Form1.Width) / 2
Randomize
End Sub
Private Sub lblWin_Click()
GO = MsgBox(lblWin.Caption, vbInformation, "Lucky Numbers")
End Sub