Tuesday, December 14, 2010

Using INPUT to create a STORY

Dim strName As String
Dim strColor As String
Dim intAge As Integer
Dim strHairColor As String
Dim x As Integer


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
x = x + 1
If x = 1 Then
strName = InputBox("What is your name")
strColor = InputBox("What is your favorite color")
intAge = InputBox("What is your Age")
strHairColor = InputBox("What is the color of you hair")
End If
If x = 2 Then
lblTitle.Text = "The Story of " & strName
End If
btnStart.Text = "Continue"
If x = 3 Then
lblTitle.Text = "There was a person named " & strName & ControlChars.NewLine & " who had only $" & intAge.ToString

End If

No comments:

Post a Comment