I am tryign to code a procedure that displays the squares of the even integers from 2 through 12 in a label control. I have to display each square on a separate line in the control using the Do...Loop statement.
My application freezes for some reason.
Here is my code:
Private Sub displayButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles displayButton.Click Dim num As Integer = 2 Dim numSquared As Integer Do While num <= 12 numSquared = (num + 2) * num squaresLabel.Text = squaresLabel.Text & Convert.ToString(numSquared) & ControlChars.NewLine Loop End Sub End Class