MoveImage




Private Sub timer1_Timer()
imgimage1(0).Top = imgimage1(0).Top + speed
imgimage1(1).Top = imgimage1(1).Top + speed
imgimage1(2).Top = imgimage1(2).Top + speed
imgimage1(3).Top = imgimage1(3).Top + speed
imgimage1(4).Top = imgimage1(4).Top + speed
imgimage1(5).Top = imgimage1(5).Top + speed
imgimage1(6).Top = imgimage1(6).Top + speed
imgimage1(7).Top = imgimage1(7).Top + speed
imgimage1(8).Top = imgimage1(8).Top + speed
imgimage1(9).Top = imgimage1(9).Top + speed
imgimage1(10).Top = imgimage1(10).Top + speed
imgimage1(11).Top = imgimage1(11).Top + speed
imgimage1(12).Top = imgimage1(12).Top + speed
If imgimage1(0).Top >= Me.Width Then imgimage1(0).Top = 0 - imgimage1(0).Width
If imgimage1(1).Top >= Me.Width Then imgimage1(1).Top = 0 - imgimage1(1).Width
If imgimage1(2).Top >= Me.Width Then imgimage1(2).Top = 0 - imgLOGS1(2).Width
If imgimage1(3).Top >= Me.Width Then imgimage1(3).Top = 0 - imgimage1(3).Width
If imgimage1(4).Top >= Me.Width Then imgimage1(4).Top = 0 - imgLOGS1(4).Width
If imgimage1(5).Top >= Me.Width Then imgimage1(5).Top = 0 - imgLOGS1(5).Width
If imgimage1(6).Top >= Me.Width Then imgimage1(6).Top = 0 - imgimage1(6).Width
If imgimage1(7).Top >= Me.Width Then imgimage1(7).Top = 0 - imgLOGS1(7).Width
If imgimage1(8).Top >= Me.Width Then imgimage1(8).Top = 0 - imgLOGS1(8).Width
If imgimage1(9).Top >= Me.Width Then image1(9).Top = 0 - imgimage1(9).Width
If imgimage1(10).Top >= Me.Width Then imgimage1(10).Top = 0 - imgimage1(10).Width
If imgimage1(11).Top >= Me.Width Then imgimage1(11).Top = 0 - imgLOGS1(11).Width
If imgimage1(12).Top >= Me.Width Then imgimage1(12).Top = 0 - imgimage1(12).Width
End Sub

'move images from left to right across form

Private Sub timer1_Timer()
imgimage1(0).left = imgimage1(0).Left + speed
imgimage1(1).left= imgimage1(1).left + speed
imgimage1(2).left= imgimage1(2).left+ speed
imgimage1(3).left= imgimage1(3).left + speed
imgimage1(4).left= imgimage1(4).left+ speed
imgimage1(5).left= imgimage1(5).left + speed
imgimage1(6).left = imgimage1(6).left+ speed
imgimage1(7).left= imgimage1(7).left+ speed
imgimage1(8).left= imgimage1(8).left + speed
imgimage1(9).left = imgimage1(9).left+ speed
imgimage1(10).left= imgimage1(10).left + speed
imgimage1(11).left= imgimage1(11).left+ speed
imgimage1(12).left= imgimage1(12).left+ speed
If imgimage1(0).left>= Me.Width Then imgimage1(0).left= 0 - imgimage1(0).Width
If imgimage1(1).left >= Me.Width Then imgimage1(1).left= 0 - imgimage1(1).Width
If imgimage1(2).left>= Me.Width Then imgimage1(2).left= 0 - imgLOGS1(2).Width
If imgimage1(3).left>= Me.Width Then imgimage1(3).left = 0 - imgimage1(3).Width
If imgimage1(4).left>= Me.Width Then imgimage1(4).left = 0 - imgLOGS1(4).Width
If imgimage1(5).left>= Me.Width Then imgimage1(5).left= 0 - imgLOGS1(5).Width
If imgimage1(6).left >= Me.Width Then imgimage1(6).left = 0 - imgimage1(6).Width
If imgimage1(7).left>= Me.Width Then imgimage1(7).left = 0 - imgLOGS1(7).Width
If imgimage1(8).left >= Me.Width Then imgimage1(8).left= 0 - imgLOGS1(8).Width
If imgimage1(9).left >= Me.Width Then image1(9).left= 0 - imgimage1(9).Width
If imgimage1(10).left>= Me.Width Then imgimage1(10).left= 0 - imgimage1(10).Width
If imgimage1(11).left>= Me.Width Then imgimage1(11).left= 0 - imgLOGS1(11).Width
If imgimage1(12).left>= Me.Width Then imgimage1(12).left= 0 - imgimage1(12).Width
End Sub

'Replace "speed" with the a number, the higher the number

'the faster the image moves

Name:
Make images go up, down and across the form
Description:
Shows how to make images move up, down, left,
and right across the screen and keep going
move images from top to bottom of form










( moveimage.html )- by Paolo Puglisi - Modifica del 17/12/2023