Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27417

[RESOLVED] Do Until Look - Exiting my program.

$
0
0
Hello

Need help with something. I have a program that upon button click will count to 100 by 10s. I have a button, and a listbox for the data to be displayed/output. I have the code set up properly, i think - the problem is once it is run, the box stops / disappears - without being able to look at the output.

My code is:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim counter As Integer = 10
Do
counter += 10
ListBox1.Items.Add(counter)
Loop Until counter > 100

End


End Sub
End Class

I've tried a console.readline() after the End - but that doesn't work out. Anyone know how to get the program to display the text and not close?

Thanks!

Viewing all articles
Browse latest Browse all 27417

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>