Shrink Right to Left


In this example I am going to shrink Image1 to reveal Image2. Again I am going to set the position of Image1 in the OnLoad routine. I am also going to set the image mode to stretch this scales the image to fit the size of the control.
Sub Layout1_OnLoad()

Image1.Top = 0
Image1.Left = 0

Image1.PictureSizeMode = 1

End Sub

All that the timer routine has to do is decrement the width of Image1. 
Sub IeTimer1_Timer()

Image1.Width = Image1.Width - (Image2.Width / 20)

If Image1.Width <= 1 Then
    IeTimer1.Enabled = 0
End If

End Sub

Notice that I use the width of Image2 to calculate the decrement value.

 

 

 

© 1997 Chris Bayes For ClubSBN. All Rights Reserved.