Question help

stui

New member
Joined
Nov 10, 2011
Messages
2
Programming Experience
Beginner
hi all ive been making hangman for a school assignment and this is the last part that i need help with here is the code so far
VB.NET:
Public Class Form1
    Dim SelectedWord As String
    Dim IntNoWords As Integer
    Dim stringarray(1000) As String
    Dim strword As String
    Dim Wordlength As Integer
    Dim UnderscoreWord As String


    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EndButton.Click
        End
    End Sub

    Private Sub ButtonA_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonA.Click
        ButtonA.Enabled = False
    End Sub

    Private Sub ButtonB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonB.Click
        ButtonB.Enabled = False
    End Sub

    Private Sub ButtonC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonC.Click
        ButtonC.Enabled = False
    End Sub

    Private Sub ButtonD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonD.Click
        ButtonD.Enabled = False
    End Sub

    Private Sub ButtonE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonE.Click
        ButtonE.Enabled = False
    End Sub

    Private Sub ButtonF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonF.Click
        ButtonF.Enabled = False
    End Sub

    Private Sub ButtonG_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonG.Click
        ButtonG.Enabled = False
    End Sub

    Private Sub ButtonH_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonH.Click
        ButtonH.Enabled = False
    End Sub

    Private Sub ButtonI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonI.Click
        ButtonI.Enabled = False
    End Sub

    Private Sub ButtonJ_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonJ.Click
        ButtonJ.Enabled = False
    End Sub

    Private Sub ButtonK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonK.Click
        ButtonK.Enabled = False
    End Sub

    Private Sub ButtonL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonL.Click
        ButtonL.Enabled = False
    End Sub

    Private Sub ButtonM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonM.Click
        ButtonM.Enabled = False
    End Sub

    Private Sub ButtonN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonN.Click
        ButtonN.Enabled = False
    End Sub

    Private Sub ButtonO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonO.Click
        ButtonO.Enabled = False
    End Sub

    Private Sub ButtonP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonP.Click
        ButtonP.Enabled = False
    End Sub

    Private Sub ButtonQ_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonQ.Click
        ButtonQ.Enabled = False
    End Sub

    Private Sub ButtonR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonR.Click
        ButtonR.Enabled = False
    End Sub

    Private Sub ButtonS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonS.Click
        ButtonS.Enabled = False
    End Sub

    Private Sub ButtonT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonT.Click
        ButtonT.Enabled = False
    End Sub

    Private Sub ButtonU_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonU.Click
        ButtonU.Enabled = False
    End Sub

    Private Sub ButtonV_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonV.Click
        ButtonV.Enabled = False
    End Sub

    Private Sub ButtonW_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonW.Click
        ButtonW.Enabled = False
    End Sub

    Private Sub ButtonX_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX.Click
        ButtonX.Enabled = False
    End Sub

    Private Sub ButtonY_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonY.Click
        ButtonY.Enabled = False
    End Sub

    Private Sub ButtonZ_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonZ.Click
        ButtonZ.Enabled = False
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim filenum As Integer = FreeFile()
        Dim filename As String = "../words.txt"

        IntNoWords = 0

        FileOpen(filenum, filename, OpenMode.Input)
        Do Until EOF(filenum)
            stringarray(IntNoWords) = LineInput(filenum)
            IntNoWords += 1
        Loop
        FileClose(filenum)
        'MsgBox("file Multi lines read " & IntNoWords)

        Randomize()
        SelectedWord = stringarray(Int(Rnd() * IntNoWords) - 1)
        'TextBox1.Text = SelectedWord
    End Sub

    Private Sub StartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartButton.Click
        TextBoxUnderScoreWord.Text = " "
        Wordlength = SelectedWord.Length

        For J As Integer = 1 To Wordlength
            UnderscoreWord += "_ "
            TextBoxUnderScoreWord.Text = UnderscoreWord
        Next
    End Sub
End Class

i just need the last few parts if any1 can help
 
I will provide you a couple of tips on posting that will help you get the assistance you want.

First, always provide meaningful thread titles. Everyone who posts wants help so a title of "help" is like no title at all. It tells us absolutely nothing about the contents of the thread. If everyone did that, we'd all have to open absolutely every thread to determine whether it was relevant to us, which would be a big waste of our time. Many people, myself included, will often simply ignore such threads. Why should we make the effort to help when you can't make the effort to type in a few words of description.

Second, be specific. I read your post as "I'm making a hangman game, here's my code, you read it and figure out what's left and do it for me". Many people, myself included, will simply ignore such threads. If you would like us to take the time to help you then it's for you to take the time to provide a proper explanation of what you have done, what you haven't done and exactly where you are stuck. That way we can get right to the point. If you take the time to help us then we will be more likely to take the time to help you and that help will be more likely to be relevant.
 
Back
Top