Hello all,
I am having one problem with an app i'm trying to work on for school. In the app we have a textbox, listbox and an add button. The user will type in a statement in the textbox and when the add button is pressed it will be displayed in the listbox. With each statement added the statements will be counted 1. through however many statements there are.
So far this is the code I have:
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles btnAdd.Click
Dim Tasks As String
Dim intCount As Int16 = 1
Tasks = txtTask.Text
intCount = lstTask.Items.Count
lstTask.Items.Add(intCount & Tasks)
The two problems i have is when i debugg the counter starts at 0 not 1 and i've tried everything to fix it. Also I can't get the spacing right, like it should be:
1. Wake Up
2. Eat Breakfast
3. Go to work
can anyone give me help to get this? Thank you in advance for any help!
I am having one problem with an app i'm trying to work on for school. In the app we have a textbox, listbox and an add button. The user will type in a statement in the textbox and when the add button is pressed it will be displayed in the listbox. With each statement added the statements will be counted 1. through however many statements there are.
So far this is the code I have:
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles btnAdd.Click
Dim Tasks As String
Dim intCount As Int16 = 1
Tasks = txtTask.Text
intCount = lstTask.Items.Count
lstTask.Items.Add(intCount & Tasks)
The two problems i have is when i debugg the counter starts at 0 not 1 and i've tried everything to fix it. Also I can't get the spacing right, like it should be:
1. Wake Up
2. Eat Breakfast
3. Go to work
can anyone give me help to get this? Thank you in advance for any help!