Nice code, but why not use the AnimateWindow API?
Code:Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As Integer) As Boolean Public Enum AnimateStyles Slide = 262144 Activate = 131072 Blend = 524288 Hide = 65536 Center = 16 HOR_Positive = 1 HOR_Negative = 2 VER_Positive = 4 VER_Negative = 8 End Enum Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load AnimateWindow(Me.Handle, 1000, AnimateStyles.HOR_Negative Or AnimateStyles.Blend) End Sub




Reply With Quote