SamuelCadieux
Messages postés31Date d'inscriptiondimanche 8 septembre 2002StatutMembreDernière intervention20 juin 2003
-
21 sept. 2002 à 22:46
cs_rene38
Messages postés1858Date d'inscriptionsamedi 29 juin 2002StatutMembreDernière intervention17 octobre 2013
-
22 sept. 2002 à 00:10
voila g fais ujne programmation mais jiniore pourquoi elle ne fonctionne poas comme voulu
Voici mon script:
Dim Nball As Integer
-----------------------------------------------------------
Private Sub Form_Load()
Randomize Timer
Nball = Int(Rnd * 999 + 1)
End Sub
-----------------------------------------------------------
Private Sub Label1_Click()
Randomize Timer
Nball = Int(Rnd * 999 + 1)
Label8.Caption = "?"
Label9.Caption = "15"
Text1.Text = ""
End Sub
-----------------------------------------------------------
Private Sub Label5_Click()
End
End Sub
-----------------------------------------------------------
Private Sub Label6_Click()
Label8.Caption = Nball
End Sub
-----------------------------------------------------------
Private Sub Text1_KeyPress(KeyAscii As Integer)
For x = 0 To 999
If KeyAscii = 13 Then
If Text1.Text = x Then
If Label9.Caption < 0 Then
Label11.Caption = "Vous avez échoué!"
If Val(Text1.Text) < Nball Then
Label3.Caption = "<"
Label9.Caption = Val(Label9.Caption) - 1
If Val(Text1.Text) > Nball Then
Label3.Caption = ">"
Label9.Caption = Val(Label9.Caption) - 1
If Val(Text1.Text) = Nball Then
Label11.Caption = "Vous avez Réussi!"
End If
End If
End If
End If
End If
End If
Next x
End Sub
cs_rene38
Messages postés1858Date d'inscriptionsamedi 29 juin 2002StatutMembreDernière intervention17 octobre 201311 22 sept. 2002 à 00:10
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Val(Label9.Caption) < 0 Then
Label11.Caption = "Vous avez échoué!"
End If
If Val(Text1.Text) < Nball Then
Label3.Caption = "<"
Label9.Caption = Val(Label9.Caption) - 1
Text1.Text = ""
End If
If Val(Text1.Text) > Nball Then
Label3.Caption = ">"
Label9.Caption = Val(Label9.Caption) - 1
Text1.Text = ""
End If
If Val(Text1.Text) = Nball Then
Label11.Caption = "Vous avez Réussi!"
End If
End If
End Sub