Programmation Msgbox si Caption = X - Page 3

Précédent
  • 1
  • 2
  • 3
napster94700 Messages postés 82 Statut Membre 16
 
nan meme pa
0
jjsteing Messages postés 1613 Date d'inscription   Statut Contributeur Dernière intervention   181
 
si si... c'est ca :) bon, y aplus court bien sur, mais c'est l idée :)

allez.. comme t as trouver, j te donne la solution :)

PasFini =false
For Each bt In Command1 'pour tous les controls de command1
If bt.Caption = "" Then PasFini = True 'met la veriable pasfini à vrai si il trouve un command vide
Next

If Not PasFini Then 'si ce n'est pas pas fini=> fini
If MsgBox("Match nul." & Chr$(10) & Chr$(13) & "Nouvelle partie ?", vbYesNo) = vbYes Then NouveauJeu_Click
End If
0
napster94700 Messages postés 82 Statut Membre 16
 
If Command1(1).Caption <> "" And Command1(5).Caption <> "" And Command1(9).Caption <> "" Then Exit Sub
If Command1(3).Caption <> "" And Command1(5).Caption <> "" And Command1(7).Caption <> "" Then Exit Sub
If Command1(1).Caption <> "" And Command1(2).Caption <> "" And Command1(3).Caption <> "" And Command1(4).Caption <> "" And Command1(5).Caption <> "" And Command1(6).Caption <> "" And Command1(7).Caption <> "" And Command1(8).Caption <> "" And Command1(9).Caption <> "" Then
MsgBox "Match Nul"

J'ai trouvé tout seul !!!
J'ai pa encore lu ta solution ;)
0
napster94700 Messages postés 82 Statut Membre 16
 
Parceque en fait si on faisait

If Command1(1).Caption <> "" And Command1(2).Caption <> "" And Command1(3).Caption <> "" And Command1(4).Caption <> "" And Command1(5).Caption <> "" And Command1(6).Caption <> "" And Command1(7).Caption <> "" And Command1(8).Caption <> "" And Command1(9).Caption <> "" Then
MsgBox "Match Nul"

et que toutes les cases était coché mais que soit o soit x gagnait en diagonale sa mettai
fenetre x ou o gagne
et apres fenetre match nul
mais la c bon :p
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
jjsteing Messages postés 1613 Date d'inscription   Statut Contributeur Dernière intervention   181
 
non, car il faut mettre un exit sub si un joueur gagne ;)
0
napster94700 Messages postés 82 Statut Membre 16
 
Comment sa ?
lol je te laisse faire voir ce que tu essai de me dire la si un joeur gagne c'est bon sa met la box x ou o gagne lol
0
jjsteing Messages postés 1613 Date d'inscription   Statut Contributeur Dernière intervention   181
 
ben si un joueur gagne .. y a plus rien a faire (mis a part recommencer une partie) donc.. le code qu'il y a apres on le squizz.. d'où le exit sub si gagné tu me suis??
0
napster94700 Messages postés 82 Statut Membre 16
 
Ouais on peut faire un reset sinnon ?
enfin sinnon tu le placerait ou le exit sub escuse chui un peu fatigué :)
0
jjsteing Messages postés 1613 Date d'inscription   Statut Contributeur Dernière intervention   181
 
apres le "gagné" mais avant l exit sub bien sur...
0
Précédent
  • 1
  • 2
  • 3