Did a search but found nothing that answers my question. Was assigned the game Hangman as a test and I haven't been able to do anything myself and it's due tomorrow. I've looked on tons of sites for help, but so far haven't found any.
The test says
You need to read a random word from a text file(included).
The user will hit the "Get Word/Phrase" button. It will then pick a random word/phrase from the text file and display that many labels at the bottom of the screen. Then enter in a letter in the textbox and hit "Check". If it is found, display the letter in a label at the bottom. If it is not found display a portion of the person. Be sure to display all letters not found in the listbox.
I used arrays to pull the random word from a text file. Used this code. Tested it by showing word in a textbox. Seems to be working, but I don't know what to do from here. How am I supposed to get it to know how many letters, and then display that letter in the correct label? Once I figure that out I'm sure I can get the rest.
This is only code I have so far...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim s As String Dim myArr(64145) As Object Dim i As Integer : i = 0 FileOpen(1, My.Application.Info.DirectoryPath & "\Words.txt", OpenMode.Input) Do While Not EOF(1) s = LineInput(1) Dim myArray(Val(CStr(i)) + 1) As Object myArr(i) = s i = i + 1 Loop End Sub