[Timer1 code]
Code:
Me.Width = Me.Width + 3
If Me.Width = 600 Then
Timer1.Stop()
Me.Width = 600 '' this was proven True 2 lines above. Sanity check? .Width already proven to be 600.
End If
If Me.Width > 600 Then
Me.Width = 600
'' why isn't timer stopped here also? Will happen on next iteration, but why.
End If
Could be
Code:
If Me.Width >= 600 Then '' Greater will only occur if for some reason the form's size was initially not set to a multiple of three (which 38 is not: so the below IF should be getting executed?). Or the +3 or 600 constants get changed.
Timer1.Enabled = False
Me.Width = 600 '' just in case it was slightly larger than 600. see above comment.
End If
Thanks for the tut.