Académique Documents
Professionnel Documents
Culture Documents
Program 3
Public Class Form1
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
' Lets go with a low number for smoother animation
Label1.Top = Label1.Top + 3
Dim bottomValue As Integer = Label1.Top + Label1.Height
' Check if the bottom of the label has hit the bottom of our form
' If so, stop the timer.
If bottomValue >= Me.ClientRectangle.Height Then
Timer1.Stop()
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
End Class