PDA

Click to See Complete Forum and Search --> : Game & Graph


Jamal
Dec 13th, 2001, 08:22 AM
GameHello everybody, I have a 2 Flag pictures. How could I make these Two picture change(rotate) every 5 seconds in the same location. Any help would be great, thanks

Jotaf98
Dec 13th, 2001, 06:55 PM
Let's see... try this code. You'll need a timer, picture1 and picture2 with the images of the flags, and an empty picture3 :)



Private Sub Timer1_Timer()
Static Pic As Long
If Pic = 1 Then
picture3.Picture = picture1.Picture
Pic = 2
Else
picture3.Picture = picture2.Picture
Pic = 1
End If
End Sub



Basically, every 5 seconds it will toggle Pic between 1 or 2, and based on that show the proper image :)

Jamal
Dec 14th, 2001, 05:36 PM
Originally posted by Jotaf98
Let's see... try this code. You'll need a timer, picture1 and picture2 with the images of the flags, and an empty picture3 :)



Private Sub Timer1_Timer()
Static Pic As Long
If Pic = 1 Then
picture3.Picture = picture1.Picture
Pic = 2
Else
picture3.Picture = picture2.Picture
Pic = 1
End If
End Sub



Basically, every 5 seconds it will toggle Pic between 1 or 2, and
based on that show the proper image :) Hello Jotat98, thank you so much , the code is perfect, thank you
again :cool: :) :) :)