All pastes #2081693 Raw Edit

Untitled

public text v1 · immutable
#2081693 ·published 2011-09-21 00:45 UTC
rendered paste body
Public Class Form1

    Dim answer As String 'Secert word
    Dim wlength As Integer ' Length of word
    Dim tempword(40) As String 'Stores letters of the word

    Private Sub btnHide_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHide.Click
        Dim i As Integer
        Dim hashword As String

        answer = txtWord.Text
        answer = answer.ToUpper

        wlength = answer.Length

        'Secrect word Hash code
        i = 0
        While (i < wlength)
            tempword(i) = "#"
            hashword = hashword + "#"

            i = i + 1
        End While

        lblAnswer.Text = hashword

        txtWord.Text = "" 'Erase word from box
    End Sub

    Private Sub lblQ_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblQ.Click, lblW.Click, lblE.Click, lblR.Click, lblT.Click, lblY.Click, lblU.Click, lblI.Click, lblO.Click, lblP.Click, lblA.Click, lblS.Click, lblD.Click, lblF.Click, lblG.Click, lblH.Click, lblJ.Click, lblK.Click, lblL.Click, lblZ.Click, lblX.Click, lblC.Click, lblV.Click, lblB.Click, lblN.Click, lblM.Click
        Dim i As Integer
        Dim wordsofar As String

        i = 0
        While (i < wlength)
            If sender.text = answer.Chars(i) Then
                tempword(i) = answer.Chars(i)

            End If

            wordsofar = wordsofar + tempword(i)
            i = i + 1
        End While

        lblAnswer.Text = wordsofar 'Word Progress
    End Sub
End Class