image rotation

spinkung

Registered User.
Local time
Today, 08:53
Joined
Dec 4, 2006
Messages
267
hi all,

i have a form with an image. i want to dynamically change the image every few seconds.

i'm sure i have seen this somewhere but can't remember where or what the procedure is called??

can anyone help, ta. spin.
 
You can use the form's timer to change something every few seconds.

SHADOW
 
hi, thanks for your reply.


i know i have to use the timer but can you advise me where. I set the time in the properties window of the form then wher in the VBE (what event) do i apply the tmer and write the code to say 'me.formPicture.picture = "\myimg.jpg"'???


thanks spin
 
On the forms TimerInterval section

Lets say you are rotating three images. You would have all three images sat on top of each other on the form. At any one time 1 is visible 2 are not.

Code:
Sub Timer()

If Me.Image1.Visible = True Then
   Me.Image1.Visible = False
   Me.Image2.Visible = True
   Me.Image3.Visible = False
ElseIf Me.Image2.Visible = True Then
   Me.Image2.Visible = False
   Me.Image3.Visible = True
   Me.Image1.Visible = False
ElseIf Me.Image3.Visible = True Then
  Me.Image3.Visible = False
  Me.Image1.Visible = True
  Me.Image2.Visible = False
End If

End Sub

David
 

Users who are viewing this thread

Back
Top Bottom