hii.i want to implement movable images in my project like from left to right or top to bottom..please do help me out..if possible just give an illustration.........waiting for reply..thnx in advance

hii.i want to implement movable images in my project like from left to right or top to bottom..please do help me out..if possible just give an illustration.........waiting for reply..thnx in advance

Private Sub Timer1_Timer()
   Dim lngFormEdge As Long
   lngFormEdge = Width
   
   With Image1
      If .Left + .Width < lngFormEdge Then
         .Move .Left + 20
      Else
         Timer1.Enabled = False
      End If
   End With
End Sub

Set your timer to whatever milliseconds you want: 1 is equal to 1 millisecond.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.