Just like a few others, i was assigned a Hangman project for VB.NET!!!

Yea so this is wat we have to do

-----read a word from a text box - DONE

-----when play is clicked, the word is read and the number of letters is replaced with an underscore (_ ) - DONE

check if the letter clicked is in the word -NOT DONE HAS TO BE A FUNCTION! - so that all u have to do is call the function for each letter

display the letter if it is found- NOT DONE also a function

each miss should have a part of the man be built - NOT DONE, should be a function

please somebody help me, i have till sunday to finish this, i've been trying and trying, and i'm still lost....

could you provide a bit more detail about how you are getting the users guesses ect... and where they come from?

A basic scheme would be

-Ask for a word (i would use inputbox) to use as the hidden word. lcase/ucase it.
-have an array of booleans for each letter (26 letters, ignore upper/lower)
DO
-When the user guesses, the value in the corresponding letter array flags true
eg user inputs an e, element 5 (index 4) = true
-Scan the hidden word and write a _ if the current letter is flagged false in the array - otherwise write the letter
EG the word is password
user has guessed e, and s
we write __ss____
-If the users letter was NOT in the word (use mid$) increase the number of wrong guesses
-draw a hangman or something equivalent
LOOP

can u read the hangman revised one please? its heavily updated :P

and to answer ure question, i used a function that called a txt file, and randomly picked words and displayed in a label, well not the word, the word disguised with underscores.

This article has been dead for over six months. Start a new discussion instead.