Using Do While in a Multiplication App
<p>I am editing a multiplication app in my VB class and I am setting up a calculation button to use a <code>Do While</code> statement to take what the user inputs and then display in a list box that number multiplied once per line (going from 1 to 9). Here is how my other function, using a For Next statement, looks when executed:</p>

<p><a href="https://i.stack.imgur.com/aLn1v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aLn1v.png" alt=""></a></p>

<p>I need to emulate the same output when I code the <code>Do While</code> statement. Here's what I have:</p>

<pre><code>Private Sub btnDoLoop_Click(sender As Object, e As EventArgs) Handles btnDoLoop.Click
    ' displays a multiplication table
    Dim number, product, count As Integer
    lstMultTable.Items.Clear()
    lstMultTable.Items.Add("Do Loop:")
    Integer.TryParse(txtNumber.Text, number)
    'Do Loop
    Do
        count = 1
        product = number * count
        lstMultTable.Items.Add("    " &amp; number.ToString() &amp; " * " &amp; count.ToString() &amp; " = " &amp; product.ToString())
    Loop Until count = 10

End Sub
</code></pre>

<p>When I run this, my calculations are supposed to show in the list box, but it ends up locking up the program. Does anyone have any suggestions in regards to the <code>Do While</code> loop? Thanks in advance.</p>