Stretch Right to Left


In this example I am going to stretch Image1 to cover Image2. It is a little bit more complicated in that as the image width increases its position also needs to change to keep it in view. In the OnLoad routine I am also going to set its initial width, position and the mode.
Sub Layout1_OnLoad()

Image1.Top = 0
Image1.Left = Image2.Width - 1
Image1.Width = 1

Image1.PictureSizeMode = 1

End Sub

Sub IeTimer1_Timer()

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

If Image1.Left <= Image2.Left Then
    IeTimer1.Enabled = 0
End If

End Sub

 

 

 

© 1997 Chris Bayes For ClubSBN. All Rights Reserved.