Hello all, im a beginner to VB.Net and kinda annoyed at the "not able to print to the screen and clear the screen facilities". Anyways i need to make a program to display the numbers 1-10 (a counter) on the form, my code so far is

Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStart.Click
Dim counter As Integer
For counter = 1 To 10
txtbox1.Text = counter
Next counter
End Sub
End Class

it only is outputing the number 10 in my textbox ive created (txtbox1.Text) , ive word wrapped the textbox and it still isnt showing numbers 1-10 all below each other. Can someone please help me, is my code wrong? can someone post a solution please and ill be able to do all my other activities also, thanks.

Recommended Answers

All 2 Replies

Member Avatar for iamthwee

txtbox1.Text &= counter

you can print and clear the screen in NET its just a bit hidden

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.