Private Sub Command1_Click()
Dim aleatorio1 As Integer, aleatorio2 As Integer, aleatorio3 As Integer
Picture1.Picture = LoadPicture("")
Picture2.Cls
Randomize
aleatorio1 = Int(Rnd() * 9) + 1
aleatorio2 = Int(Rnd() * 9) + 1
aleatorio3 = Int(Rnd() * 9) + 1
Label1.Caption = aleatorio1
Label2.Caption = aleatorio2
Label3.Caption = aleatorio3
If aleatorio1 = 7 Or aleatorio2 = 7 Or aleatorio3 = 7 Then
Picture1.Picture = LoadPicture("C:\Users\11I20\Pictures\moedas")
ElseIf aleatorio1 = 7 Or aleatorio2 = 7 And aleatorio3 = 7 Or aleatorio1 = 7 And aleatorio2 = 7 Or aleatorio3 = 7 Or aleatorio1 = 7 And aleatorio3 = 7 Or aleatorio2 = 7 Then
Picture2.Print "jackPot "
Else
Picture2.Print "tente outra vez "
End If
End Sub

Sem comentários:
Enviar um comentário