Hi i am using a timer and the following code to loop through a listbox. i want to be able to stop the timer when the last item in the listbox is selected. any help with this would be Greatly Appreciated. Many thanks
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Try
Static index As Integer = 0
ListBox1.SelectedIndex = (index Mod ListBox1.Items.Count)
index += 1
Catch ex As Exception
End Try
end sub
Many Thanks
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Try
Static index As Integer = 0
ListBox1.SelectedIndex = (index Mod ListBox1.Items.Count)
index += 1
Catch ex As Exception
End Try
end sub
Many Thanks