Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21847

need help with hangman game

$
0
0
In my hangman game if i have a word with two of the same letters only the first of the two will show up. I have the labels invisible until you guess it right, here is the code:

Private Sub btnguess_Click()
If txtguess.Text = letter1 Then
Label1.Visible = True
ElseIf txtguess.Text = letter2 Then
Label2.Visible = True
ElseIf txtguess.Text = letter3 Then
Label3.Visible = True
ElseIf txtguess.Text = letter4 Then
Label4.Visible = True
ElseIf txtguess.Text = letter5 Then
Label5.Visible = True
ElseIf txtguess.Text = letter6 Then
Label6.Visible = True
ElseIf txtguess.Text = letter7 Then
Label7.Visible = True
ElseIf txtguess.Text = letter8 Then
Label8.Visible = True

Viewing all articles
Browse latest Browse all 21847

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>