try this:
Code:Public Class Form1 Dim firstUsed As Integer = 2 Dim labels() As Label Dim strings() As String = {"My name", "is", "Paul"} Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load labels = New Label() {Label1, Label2, Label3} End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick For x As Integer = 0 To firstUsed labels(x).Text = "" Next For x As Integer = firstUsed To labels.GetUpperBound(0) labels(x).Text = strings(x - firstUsed) Next firstUsed = If(firstUsed = 0, 2, firstUsed - 1) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Enabled = True End Sub End Class




Reply With Quote