Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turn on/off Animation

Status
Not open for further replies.

lars7

Technical User
Aug 16, 2005
817
GB
Hi,

I have some animation code that works well from the on timer event of the form but is running constantly.

What I would like to do is turn it on and off from a command button, does anyone know how I could do this?

Thanks in advance.

' code for animation

Static sintPic As Integer

' Hide the last one shown
Me("lblDM" & sintPic).Visible = False

' Increment the static to point to the next one
sintPic = (sintPic + 1) Mod 4

' Show the next one
Me("lblDM" & sintPic).Visible = True
 
Simply play with the Me.TimerInterval property.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PH,
I will look at that but I found a way with an if statement in the on timer event and a couple of buttons:

If Me("lblDM" & sintPic).Visible = True Then
Call "function name"
Me("lblDM" & sintPic).Visible = True
End If

button1
Me("lblDM" & sintPic).Visible = true

button2
Me("lblDM" & sintPic).Visible = false

thanks for your reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top