ListBox1.Items.Add("1-Starting...")
ListBox1.Items.Add("2-Task1 completed...")
ListBox1.Items.Add("3-Task2 completed...")
ListBox1.Items.Add("4-Task3 completed...")
ListBox1.Items.Add("5-Task4 completed...")
ListBox1.Items.Add("6-Task5 completed...")
ListBox1.Items.Add("7-Task6 completed...")
ListBox1.Items.Add("8-Task7 completed...")
ListBox1.Items.Add("9-Task8 completed...")
ListBox1.Items.Add("10-Task9 completed...")
ListBox1.Items.Add("11-Task10 completed...")
ListBox1.Items.Add("12-Finished...")
' Determine if the currently selected item in the ListBox
' is the item displayed at the top in the ListBox.
If ListBox1.TopIndex <> ListBox1.Items.Count.ToString() Then
ListBox1.TopIndex = ListBox1.Items.Count.ToString()
End If
' Remove all items before the top item in the ListBox.
Dim x As Integer
For x = ListBox1.Items.Count.ToString() - 1 To 0 Step -1
ListBox1.Items.RemoveAt(x)
Next x
' Clear all selections in the ListBox.
ListBox1.ClearSelected()