Simple animation help

anaylor01

Well-Known Member
Licensed User
Longtime User
I want to use a button/label/panel something to grow from nothing. Wait a second and then shrink back down to nothing.
 

anaylor01

Well-Known Member
Licensed User
Longtime User
do you know where I can find an example. I tried the animation example on this forum but I couldn't get it to work.
 
Upvote 0

anaylor01

Well-Known Member
Licensed User
Longtime User
I am using the following code. But I don't want to use a button. I don't want the user to have to click the button for the animation to start. I want to be able to call a sub to do it.

Dim a1, a2, a3, a4, a5 As Animation
a1.InitializeAlpha("", 1, 0)
Button5.Tag = a1
a2.InitializeRotate("", 0, 10)
button5.Tag = a2
a3.InitializeRotateCenter("", 0, 0, button5)
button5.Tag = a3
a4.InitializeScale("", 1, 1, 0, 0)
button5.Tag = a4
a5.InitializeScaleCenter("", 0,0, 1, 1, button5)
Button5.Tag = a5
Dim animations() As Animation
animations = Array As Animation(a1, a2, a3, a4, a5)
button5.Visible=False
For i = 0 To animations.Length - 1
animations(i).Duration = 2500
animations(i).RepeatCount = 1
animations(i).RepeatMode = animations(i).REPEAT_REVERSE
Next
'Msgbox(animations.Length,"test")
For i = 0 To animations.Length - 1
animations(i).Duration = 2500
Next
Dim b As Button
Msgbox(Sender,"test")
b = Sender
'Safety check. Not really required in this case.
If Not(b.Tag Is Animation) Then Return
Dim c As Animation
c = b.Tag
c.Start(b)
 
Upvote 0
Top