Hi I am a relative newb to coding. I had 1 year of training but it was VB6 like a few years ago, and i haven't picked up VB since. So to my question: How can I make a label move from let's say (100,100) to (100,0) gradually? Like make it move from one specific point then once it reaches it destination, it'll stop? my current code for that is:
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Label1.Location = New Point(Label1.Location.X, Label1.Location.Y + 10)
If Label1.Location.Y = 22 Then
Timer2.Enabled = False
End If
End Sub
End Class
However it doesn't stop moving. Please help! Thank you :)
Quote:
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Label1.Location = New Point(Label1.Location.X, Label1.Location.Y + 10)
If Label1.Location.Y = 22 Then
Timer2.Enabled = False
End If
End Sub
End Class