Sulla mia macchina l'animazione è molto fluida, complimenti, la simulazione di "frenata" tra l'altro è molto gradevole. Bisogna però vedere l'effetto su macchine meno recenti...
Tra parentesi, invece di usare una variabile stringa per memorizzare la direzione ti basta usare una variabile booleana.
codice:Public Class easingPanel Public moveToRight As Boolean = True Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If moveToRight Then Dim targetX As Integer = 500 Dim distX As Integer = targetX - Panel1.Location.X If Panel1.Location.X <= targetX - 2 Then Dim movex As Integer = distX / 2 Panel1.Left += movex Else Panel1.Left = 500 Timer1.Enabled = False moveToRight = False End If Else Dim targetX As Integer = 10 Dim distX As Integer = targetX - Panel1.Location.X If Panel1.Location.X >= targetX + 2 Then Dim movex As Integer = distX / 2 Panel1.Left += movex Else Panel1.Left = 10 Timer1.Enabled = False moveToRight = True End If End If lblX.Text = Panel1.Location.X End Sub Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click Timer1.Enabled = True End Sub End Class